Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

create-repro-ts-node-issue

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-repro-ts-node-issue - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

2

package.json
{
"name": "create-repro-ts-node-issue",
"description": "",
"version": "0.1.0",
"version": "0.2.0",
"repository": {

@@ -6,0 +6,0 @@ "type": "git",

@@ -9,4 +9,6 @@ ![npm version](https://img.shields.io/npm/v/create-repro-ts-node-issue.svg?style=flat-square)

## Running directly: 🌸
## Problem description
### Running directly: 🌸
It runs fine when called directly with `./index` from the command line:

@@ -20,3 +22,3 @@

## Using `yarn link`: 🌼
### Using `yarn link`: 🌼

@@ -43,3 +45,3 @@ It also runs fine when globally linked and run using the `bin` entry point:

## Using `yarn create`: 🥀
### Using `yarn create`: 🥀

@@ -59,3 +61,77 @@ [`yarn create`](https://yarnpkg.com/lang/en/docs/cli/create/) is a very handy

$ yarn create repro-ts-node-issue
# Coming soon...
yarn create v1.7.0
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Building fresh packages...
success Installed "create-repro-ts-node-issue@0.1.0" with binaries:
- create-repro-ts-node-issue
/Users/astorije/.config/yarn/global/node_modules/create-repro-ts-node-issue/src/index.ts:1
(function (exports, require, module, __filename, __dirname) { import inquirer from "inquirer";
^^^^^^
SyntaxError: Unexpected token import
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Module._extensions..js (module.js:663:10)
at Object.require.extensions.(anonymous function) [as .ts] (/Users/astorije/.config/yarn/global/node_modules/create-repro-ts-node-issue/node_modules/ts-node/src/index.ts:431:14)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
error Command failed.
Exit code: 1
Command: /usr/local/bin/create-repro-ts-node-issue
Arguments:
Directory: /private/tmp/cht-foo
Output:
```
### Installing globally: 🥀
To reproduce this, we went on using a globally installed version, and got the
same result:
```sh
$ yarn global add create-repro-ts-node-issue
yarn global v1.7.0
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Building fresh packages...
success Installed "create-repro-ts-node-issue@0.1.0" with binaries:
- create-repro-ts-node-issue
✨ Done in 6.50s.
$ create-repro-ts-node-issue
/Users/astorije/.config/yarn/global/node_modules/create-repro-ts-node-issue/src/index.ts:1
(function (exports, require, module, __filename, __dirname) { import inquirer from "inquirer";
^^^^^^
SyntaxError: Unexpected token import
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Module._extensions..js (module.js:663:10)
at Object.require.extensions.(anonymous function) [as .ts] (/Users/astorije/.config/yarn/global/node_modules/create-repro-ts-node-issue/node_modules/ts-node/src/index.ts:431:14)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
```
## Versions
```sh
$ node --version
v8.11.3
$ yarn --version
1.7.0
$ uname -v
Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64
```
{
"compilerOptions": {
/* Basic Options */
"target": "es2015",
"target": "es5",
"lib": [ // Specify library files to be included in the compilation.

@@ -6,0 +6,0 @@ "es2015",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc