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

Having a file named node.js will be "run" instead of node #40

Closed
coolaj86 opened this issue Sep 6, 2019 · 1 comment
Closed

Having a file named node.js will be "run" instead of node #40

coolaj86 opened this issue Sep 6, 2019 · 1 comment

Comments

@coolaj86
Copy link

coolaj86 commented Sep 6, 2019

See https://npm.community/t/windows-10-npm-opens-vscode-instead-of-running-postinstall-script-on/9911

I have a file named node.js, which is the node version of the code (a browser.js is coming).

I have a postinstall script with #!/usr/bin/env node

The postinstall in the package.json is

{ "scripts": {
    "postinstall": "node scripts/postinstall"
  },
  ...
}

Instead of running the postinstall script with node.exe, it opens node.js in a text editor.

@isaacs
Copy link
Contributor

isaacs commented Oct 8, 2019

My guess is that .JS is in your PATHEXT environment variable.

Probably you wanna fix that.

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