-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[BUG] Run Scripts and Lifecycle Scripts Broken on IBM i #6025
Comments
npm 8 is EOL, have you tried npm 9 latest? (Also if the behavior only occurs on a patched version of npm, that seems like something that should be reported to the patch authors) |
I have notified the folks at IBM who manage the Node/NPM repos for IBM i. On IBM i, it's not common for users to manually install or upgrade NPM and Node. We use packages that are provided by IBM in 'yum' repositories that they manage. I'm not aware of whether the NPM they supply is a patched or a vanilla copy, but I have observed the problem only happens on IBM i. So, using NPM 9 latest would not be an ideal solution here, as the typical IBM i user is going to have the affected copy of NPM from the IBM repos. But, I will try it out and report the results... |
This is caused by npm/run-script#103, which affects any platform whose We tried to work around this by setting script-shell to bash in the global npm config, but I think #5297 prevented that from being an effective workaround. Apparently the run-script bug was fixed according to npm/run-script#103 (comment), so I'll see if we can get those changes backported in to our packages. |
@kadler thanks! That would certainly explain it. Meanwhile, I tried NPM 9 latest and the problem is solved there. That would be great if we could get an updated or patched copy of NPM in the IBM i yum repos. |
This is resolved with kadler's updates to Node.js/NPM in the IBM i repos. |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
This issue applies to certain versions of NPM supplied by IBM in the yum repos for the IBM i operating system. This issue does NOT seem to affect the same versions of NPM on other platforms.
Affected NPM versions:
Even though the NPM version number is the same, the behavior is different in the 2 scenarios mentioned above.
In affected versions of NPM, lifecycle and run scripts are entirely broken. This prevents many packages from installing properly.
Take for example this simplistic package (create files in a directory named 'test'):
File test/package.json:
File test/install.js:
File test/do_something.js:
npm install
from inside the 'test' directory fails with this output:npm run do_something
from inside the 'test' directory fails with this output:npm run --prefix test do_something
, it fails with this output:These problems suddenly cropped up with the recent updates to the nodejs16 and nodejs18 packages in the IBM i yum repos. For example, NPM 8.5.0 shipped with Node.js 16.14.2 is NOT affected. Also, NPM 8.6.0 shipped with Node.js 18.0.0 is NOT affected.
Expected Behavior
The lifecycle and run scripts should execute without error.
Steps To Reproduce
See above.
Environment
The text was updated successfully, but these errors were encountered: