You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In fact, add is called with undefined in a Docker container when running any script. (I'm not sure what about the Docker environment causes this.) See repro instructions below.
When
Repros consistently.
Where
n/a
How
n/a
Current Behavior
When running any script, npm raises the following error:
23 verbose stack TypeError: Cannot read property 'once' of undefined
23 verbose stack at Object.add (/usr/local/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/signal-manager.js:36:8)
23 verbose stack at runScriptPkg (/usr/local/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js:63:19)
23 verbose stack at runScript (/usr/local/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script.js:8:16)
23 verbose stack at runScript (/usr/local/lib/node_modules/npm/lib/run-script.js:77:11)
Steps to Reproduce
Create a Dockerfile containing:
FROM node:14.14
RUN npm install --global npm@7.0.6
WORKDIR /app
RUN npm init -y
RUN npm test || exit 0
RUN cat /root/.npm/_logs/*.log
What / Why
This code assumes that
add
is only ever called with an object with aonce
method:run-script/lib/signal-manager.js
Lines 31 to 36 in 1c7bbcd
In fact,
add
is called withundefined
in a Docker container when running any script. (I'm not sure what about the Docker environment causes this.) See repro instructions below.When
Repros consistently.
Where
How
Current Behavior
When running any script, npm raises the following error:
Steps to Reproduce
Create a
Dockerfile
containing:Then, run
docker build .
.Expected Behavior
An error should not be raised.
Who
References
The text was updated successfully, but these errors were encountered: