-
Notifications
You must be signed in to change notification settings - Fork 128
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
Node shebang line results in error since Node.js 12.16.0 #178
Comments
As of NodeJS 12.16.0, importing modules with shebang declarations failed. This commit checks the first line for shebang declarations and removes them before trying to load the module.
To add that I've encountered this as well, and that module that is being rewired doesn't have to be the one with the shebang. Node 12.15.0 is ok, but 12.16.x has the failure. Great to see a fix yesterday @jhnns - do you have an expected re-release date? |
…ge on node >= 12.16.0 (#2699) This is related to a bug in "rewire" package. jhnns/rewire#178
hi, came across this bug when I was debugging a similar issue with Electron. I filed this Node bug nodejs/node#36173. I suspect you are running into the same thing because |
for us it breaks loading plant-uml package to auto-generate uml images while running jsdoc... |
Has this been fixed?
|
@cope there is a PR for this, but it's never been merged. We abandoned using this module. It doesn't appear to be maintained any longer |
@mbwhite thanks for the info is there an alternative to use? |
Using rewire@5.0.0. Modules including shebang line can no longer be loaded with rewire.
Files to test the issue:
With Node.js 12.15.0 it still works:
Starting with Node.js 12.16.0 it fails:
There has been some changes on shebang handling in Node.js 12.16.0:
nodejs/node@bcd27f7300
nodejs/node@1c50714729
The text was updated successfully, but these errors were encountered: