Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scope CLI option doesn't work as expected #1493

Closed
ofagbemi opened this issue Oct 8, 2021 · 1 comment
Closed

scope CLI option doesn't work as expected #1493

ofagbemi opened this issue Oct 8, 2021 · 1 comment

Comments

@ofagbemi
Copy link

ofagbemi commented Oct 8, 2021

Search Terms

"scope", "Emit skipped"

Expected Behavior

Was reading through #693 and saw that a --scope flag fix in #1346 was merged. However, it doesn't appear to work on [email protected]. I wrote a small script that imports from a module in the same yarn workspace. It runs successfully if I set TS_NODE_SCOPE=true, but crashes with an "Emit skipped" error when I use the --scope flag.

Actual Behavior

The script exits successfully when I use TS_NODE_SCOPE=true while it crashes with an "Emit skipped" error when I use the --scope flag

Steps to reproduce the problem

See run.sh here: TypeStrong/ts-node-repros#19

TS_NODE_SCOPE=true yarn ts-node b/index.ts --project b/tsconfig.json works.

yarn ts-node b/index.ts --project b/tsconfig.json --scope fails.

Minimal reproduction

TypeStrong/ts-node-repros#19

Specifications

  • ts-node version: 10.2.1
  • node version: v12.21.0
  • TypeScript version: latest
  • tsconfig.json, if you're using one:
{
  "compilerOptions": {
    "allowJs": true
  },
  "include": ["index.ts"]
}
  • Operating system and version: macOS Big Sur
@cspotcode
Copy link
Collaborator

Looks like an issue with passing command-line arguments in the wrong order. https://typestrong.org/ts-node/docs/configuration#cli-flags

Closing as not a bug. If you believe it is a bug or I've misunderstood, we can always reopen this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants