cypress: Error while trying to install cypress with ubuntu 18.04
Description:
Error while trying to install cypress with ubuntu 18.04
mkdir cypressTest
cd cypressTest
npm init
npm install cypress --save-dev
Actual result:
!10391
> cypress@3.2.0 postinstall /root/cypresstest/node_modules/cypress
> node index.js --exec install
internal/modules/cjs/loader.js:651
throw err;
^
Error: Cannot find module '/root/cypresstest/node_modules/cypress/index.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:649:15)
at Function.Module._load (internal/modules/cjs/loader.js:575:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:862:12)
at internal/main/run_main_module.js:21:11
npm WARN cypresstest@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cypress@3.2.0 postinstall: `node index.js --exec install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cypress@3.2.0 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! /home/xtrremx/.npm/_logs/2019-03-28T08_33_18_514Z-debug.log
Env:
OS: ubuntu 18.04 64bit npm: 6.7.0
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 19 (4 by maintainers)
@jonathan-marz 's solution quoted here :
worked for me and allowed me to run cypress as a dev dependency using :
sudo npm i --save-dev cypress --unsafe-perm=true --allow-rootI was facing the same issue with: npm 6.13.4 ubuntu 18.04 node 12.14.0
Found another issue on google with the solution. Try to add
--unsafe-perm=true --allow-rootto the end and for me it worked. But first it looks like it worked but at the end it fails.Good damn this sucks. 😦
Update to this:
The above issue was resolved for me by unchecking “Read-only” in the properties of the “C:/Users/[USER]/AppData/Local/Temp” folder.
closing as stale.
@flotwig That fixed the problem. Thanks!