-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
I’m encountering an issue where the npm stop command defined in the scripts section of package.json (which runs node --expose_gc ./lib/stop.js) does not get triggered when executed from a script file.
This issue occurs in the following environment:
Operating System: AIX 7.3 TL3 SP0 (running on a Linux system)
Node.js Version: v22.14.0
NPM Version: v10.9.2
Notably, the npm start command works as expected from the same script file, but npm stop fails to execute.
Expected Behavior
When triggering npm stop from a script file, the expected behavior is:
Execution of the stop Script in package.json:
The command defined under the "stop" field in the scripts section of package.json (e.g., "stop": "node --expose_gc ./lib/stop.js") should execute properly.
Consistent Behavior Across Commands:
Just as npm start executes the corresponding script from the same file context, npm stop should behave consistently and be triggered in the same manner.
Steps To Reproduce
While attempting to trigger the npm stop command from a script file, it fails to execute as expected. The environment in which this issue occurs consists of Node.js v22.14.0 and NPM v10.9.2, running on AIX 7.3.
Environment
npm -v: npm 10.9.2
node -v: Node.js: 22.14.0
system: AIX 7.3
npm stop is not triggering from script file