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.

npm install fails on Ubuntu 14.04 LTS

See original GitHub issue

Trying to install a module that has deasync as a dependency, and on both Node 4.4.5 and 5.11.1 the build fails as such:

> deasync@0.1.7 install /root/.nvm/versions/node/v5.11.1/lib/node_modules/dapple/node_modules/deasync
> node ./build.js

module.js:327
    throw err;
    ^

Error: Cannot find module '/root/.nvm/versions/node/v5.11.1/lib/node_modules/dapple/node_modules/deasync/build.js'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:968:3
/root/.nvm/versions/node/v5.11.1/lib
`-- (empty)

npm ERR! Linux 4.2.0-35-generic
npm ERR! argv "/root/.nvm/versions/node/v5.11.1/bin/node" "/root/.nvm/versions/node/v5.11.1/bin/npm" "i" "-g" "dapple"
npm ERR! node v5.11.1
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE

npm ERR! deasync@0.1.7 install: `node ./build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the deasync@0.1.7 install script 'node ./build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the deasync package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs deasync
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls deasync
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /root/workspace/whuffie/npm-debug.log
npm ERR! code 1

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Xebozonecommented, Nov 5, 2020

This worked for me (took a bit of research and testing, so hope it works for you!):

Update NodeJS:

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs

Install Yarn:

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn

Install deasync with Yarn:

sudo yarn add deasync
0reactions
garritfracommented, May 31, 2018

@kidandcat I think it worked using yarn because yarn has a seperate lockfile. try removing package-lock.json and try reinstalling. Worked like a charm.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm install fails on Ubuntu 14.04 with recent node/npm #1212
npm ERR ! Failed at the keytar@3.0.0 install script 'node-gyp rebuild'. npm ERR! Make sure you have the latest version of node.js and...
Read more >
Why npm init is not working - ubuntu 14.04 lts
npm init is not creating the package.json file. Node version: 0.10.25. I found this solution on Ask Ubuntu: sudo apt-get remove npm sudo ......
Read more >
Npm install fails on Ubuntu - node.js - Stack Overflow
I installed NodeJS and npm by apt-get . Both of them gets installed perfectly. When I run node -v I get the following....
Read more >
Node.js client installation problem on Ubuntu 14.04 LTS
After installing nodejs and npm on Ubuntu 14.04 LTS, getting the following error while installing node.js aerospike client: $sudo npm ...
Read more >
npm package installation fails in Ubuntu 14.04.2 — Bitbucket
Standard installation steps for Sage2 on 14.04 LTS proceed without error until attempting to install Node.js dependencies via "npm install" command, ...
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