npm-cli-login icon indicating copy to clipboard operation
npm-cli-login copied to clipboard

snyk updated to v1.1045.0 causing file not fount in post install

Open gantich opened this issue 3 years ago • 8 comments

Just after synk got updated to v1.1045.0, npm-cli-login started having this issue

$ npm i -g npm-cli-login
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
/root/.nvm/versions/node/v14.15.5/bin/npm-cli-login -> /root/.nvm/versions/node/v14.15.5/lib/node_modules/npm-cli-login/bin/npm-cli-login.js
> [email protected] postinstall /root/.nvm/versions/node/v14.15.5/lib/node_modules/npm-cli-login/node_modules/snyk
> bash ./scripts/apply-patches.sh
bash: ./scripts/apply-patches.sh: No such file or directory
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] postinstall: `bash ./scripts/apply-patches.sh`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-10-31T10_14_48_295Z-debug.log

gantich avatar Oct 31 '22 10:10 gantich

Facing a similar issue

shubhamjain@shubhams-MacBook-Pro dev % npm install -g npm-cli-login    
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 127
npm ERR! path /usr/local/lib/node_modules/npm-cli-login/node_modules/snyk
npm ERR! command failed
npm ERR! command sh -c bash ./scripts/apply-patches.sh
npm ERR! bash: ./scripts/apply-patches.sh: No such file or directory

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/shubhamjain/.npm/_logs/2022-10-31T10_43_21_895Z-debug-0.log

ShubhamJainSJ avatar Oct 31 '22 10:10 ShubhamJainSJ

Seems like its snyk's issue, just posted for others to acknoweledge it is happening to others

gantich avatar Oct 31 '22 10:10 gantich

@gantich Have you solved this problem? I also encountered this

longgui0318 avatar Oct 31 '22 10:10 longgui0318

It is snyk's issue and has already been reported. Just wait for them to fix it and that should be it. It has nothing to do with npm-cli-login. Issue link to check for solution is https://github.com/snyk/cli/issues/4182

gantich avatar Oct 31 '22 11:10 gantich

Why is snyk required as dependency and not as devDependency? Maybe pinning the dependency would help in the future?

arkus7 avatar Oct 31 '22 11:10 arkus7

facing similar issue.

~# npm install -g npm-cli-login
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
/usr/bin/npm-cli-login -> /usr/lib/node_modules/npm-cli-login/bin/npm-cli-login.js

> [email protected] postinstall /usr/lib/node_modules/npm-cli-login/node_modules/snyk
> bash ./scripts/apply-patches.sh

bash: ./scripts/apply-patches.sh: No such file or directory
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] postinstall: `bash ./scripts/apply-patches.sh`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-10-31T12_15_22_120Z-debug.log

gramcha avatar Oct 31 '22 12:10 gramcha

+1

zeshanvirk avatar Oct 31 '22 13:10 zeshanvirk

The bug got fixed just minutes ago. Please bump snyk version to 1.1046.0 See https://github.com/snyk/cli/issues/4183#issuecomment-1297170245

JensUweB avatar Oct 31 '22 14:10 JensUweB