question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error while trying to install cypress with ubuntu 18.04

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:19 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
pserafinicommented, May 24, 2020

@jonathan-marz 's solution quoted here :

Try to add --unsafe-perm=true --allow-root to the end and for me it worked.

worked for me and allowed me to run cypress as a dev dependency using :

sudo npm i --save-dev cypress --unsafe-perm=true --allow-root

2reactions
jonathan-martzcommented, Jan 9, 2020

I 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-root to the end and for me it worked. But first it looks like it worked but at the end it fails.

Good damn this sucks. 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot run Cypress on Ubuntu 18.04 - Stack Overflow
I am asking because a working installation started failing me yesterday, but running it that way does work for me.
Read more >
Installing - Cypress Documentation
This will install Cypress locally as a dev dependency for your project. Make sure that you have already run npm init or have...
Read more >
cypress-io/cypress - Gitter
We are getting reports that Cypress has suddenly started crashing when running on ubuntu-latest OS. Seems, GH Actions have switched from 16.04 to...
Read more >
Installing Cypress - w3resource
In this tutorial we will show you how to install Cypress via npm, yarn. We will also show you how to install Cypress...
Read more >
cypress - npm
What is this? Cypress comes packaged as an npm module, which is all you need to get started testing. After installing you'll be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found