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

[BUG] Cannot find module 'yaml' when installing 7.0.6 with install.sh #2059

Closed
mhart opened this issue Oct 28, 2020 · 2 comments
Closed

[BUG] Cannot find module 'yaml' when installing 7.0.6 with install.sh #2059

mhart opened this issue Oct 28, 2020 · 2 comments
Assignees
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release

Comments

@mhart
Copy link
Contributor

mhart commented Oct 28, 2020

Current Behavior:

$ curl -L https://www.npmjs.com/install.sh | npm_install=7.0.6 sh

fetching: https://registry.npmjs.org/npm/-/npm-7.0.6.tgz

up to date in 631ms

found 0 vulnerabilities
npm ERR! code 2
npm ERR! path /tmp/npm.15/package
npm ERR! command failed
npm ERR! command sh -c node bin/npm-cli.js rebuild && make -j4
npm ERR! rebuilt dependencies successfully
npm ERR! node bin/npm-cli.js install marked --no-global --no-timing --no-save
npm ERR! node bin/npm-cli.js install marked-man --no-global --no-timing --no-save
npm ERR! cd docs && node dockhand.js >&2
npm ERR! node:internal/modules/cjs/loader:903
npm ERR!   throw err;
npm ERR!   ^
npm ERR! 
npm ERR! Error: Cannot find module 'yaml'
npm ERR! Require stack:
npm ERR! - /tmp/npm.15/package/docs/dockhand.js
npm ERR!     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:900:15)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:745:27)
npm ERR!     at Module.require (node:internal/modules/cjs/loader:972:19)
npm ERR!     at require (node:internal/modules/cjs/helpers:88:18)
npm ERR!     at Object.<anonymous> (/tmp/npm.15/package/docs/dockhand.js:5:14)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1083:30)
npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:948:32)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:789:14)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:72:12) {
npm ERR!   code: 'MODULE_NOT_FOUND',
npm ERR!   requireStack: [ '/tmp/npm.15/package/docs/dockhand.js' ]
npm ERR! }
npm ERR! make: *** [Makefile:59: htmldocs] Error 1
npm ERR! make: *** Waiting for unfinished jobs....
npm ERR! npm ERR! code ERESOLVE
npm ERR! npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! npm ERR! 
npm ERR! npm ERR! While resolving: [email protected]
npm ERR! npm ERR! Found: [email protected]
npm ERR! npm ERR! node_modules/marked
npm ERR! npm ERR!   marked@"*" from the root project
npm ERR! npm ERR! 
npm ERR! npm ERR! Could not resolve dependency:
npm ERR! npm ERR! peer marked@"^0.7.0" from [email protected]
npm ERR! npm ERR! node_modules/marked-man
npm ERR! npm ERR!   dev marked-man@"^0.7.0" from the root project
npm ERR! npm ERR! 
npm ERR! npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! npm ERR! 
npm ERR! npm ERR! See /root/.npm/eresolve-report.txt for a full report.
npm ERR! 
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     /root/.npm/_logs/2020-10-28T01_47_14_567Z-debug.log
npm ERR! make: *** [Makefile:109: node_modules/.bin/marked] Error 1
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /tmp/npm.15/package/node_modules/cmark-gfm
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c prebuild-install || node-gyp rebuild
npm ERR! npm ERR! make[1]: Entering directory '/tmp/npm.15/package/node_modules/cmark-gfm/build'
npm ERR! npm ERR!   CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
npm ERR! npm ERR! make[1]: Leaving directory '/tmp/npm.15/package/node_modules/cmark-gfm/build'
npm ERR! npm ERR! make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
npm ERR! npm ERR! make[1]: cc: No such file or directory
npm ERR! npm ERR! make[1]: *** [../node-addon-api/nothing.target.mk:107: Release/obj.target/nothing/../node-addon-api/nothing.o] Error 127
npm ERR! npm ERR! gyp ERR! build error 
npm ERR! npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! npm ERR! gyp ERR! stack     at ChildProcess.onExit (/tmp/npm.15/package/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:327:20)
npm ERR! npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:277:12)
npm ERR! npm ERR! gyp ERR! System Linux 5.4.39-linuxkit
npm ERR! npm ERR! gyp ERR! command "/usr/bin/node" "/tmp/npm.15/package/node_modules/.bin/node-gyp" "rebuild"
npm ERR! npm ERR! gyp ERR! cwd /tmp/npm.15/package/node_modules/cmark-gfm
npm ERR! npm ERR! gyp ERR! node -v v15.0.1
npm ERR! npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! npm ERR! gyp ERR! not ok
npm ERR! 
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     /root/.npm/_logs/2020-10-28T01_47_33_777Z-debug.log
npm ERR! make: *** [Makefile:114: node_modules/.bin/marked-man] Error 1

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-10-28T01_47_33_870Z-debug.log
npm ERR! code 1
npm ERR! path /tmp/npm.15/package
npm ERR! command failed
npm ERR! command sh -c node bin/npm-cli.js rebuild && make -j4
npm ERR! npm ERR! Cannot read property 'isRoot' of null
npm ERR! 
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     /root/.npm/_logs/2020-10-28T01_47_36_776Z-debug.log

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-10-28T01_47_36_804Z-debug.log
It failed

Expected Behavior:

7.0.6 should install like 7.0.4 and previous versions do using this script

Steps To Reproduce:

docker run --rm mhart/alpine-node:slim sh -c \
 'apk add --no-cache curl make bash && curl -L https://www.npmjs.com/install.sh | npm_install=7.0.6 sh'

Environment:

Node.js 15.0.1
Alpine Linux

The last working version seems to be 7.0.4:

$ docker run --rm mhart/alpine-node:slim sh -c \
 'apk add --no-cache curl make bash && curl -L https://www.npmjs.com/install.sh | npm_install=7.0.6 sh'

fetching: https://registry.npmjs.org/npm/-/npm-7.0.4.tgz

removed 248 packages in 1s

found 0 vulnerabilities

added 1 package, and audited 248 packages in 11s

10 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
It worked
@mhart mhart added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Oct 28, 2020
@mhart
Copy link
Contributor Author

mhart commented Oct 28, 2020

With this, and the current EXDEV bug with 7.x, there appears to be no way now to update npm@7 in a docker container/image.

@nlf nlf removed the Needs Triage needs review for next steps label Oct 28, 2020
@nlf nlf self-assigned this Oct 28, 2020
@nlf
Copy link
Contributor

nlf commented Nov 6, 2020

we replaced the install.sh script with a version that fixes this

(as a bonus we also fixed the EXDEV bug in [email protected])

@nlf nlf closed this as completed Nov 6, 2020
@darcyclarke darcyclarke added this to the OSS - Sprint 19 milestone Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

3 participants