npm install fails on Ubuntu 14.04 LTS
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:
> [email protected] 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! [email protected] install: `node ./build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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
Have you tried npm cache clean deasync then reinstall the module?
Also can you install deasync directly by running npm install deasync?
@abbr Ahh, so on both versions of Node (4.4.5 and 5.11.1), installing locally works just fine but installing globally does not and provides the same error log as above.
Using 6.5 (also on 16.04)
I'm getting this error when in root sudo -i, any ideas?
Also seeing this error on 16.04. Tried cleaning the cache, but this did not fix it.
I can pass by own user on 16.04. but root user makes it.
Hi
I also have the same issue on Ubuntu 16.04. As a total beginner with javascript, I would be very happy to receive some guidance on that issue? I tried updating npm and nodejs, and did:
sudo npm install npm@latest -g
and have hence npm version 3.5.2 and nodejs v 4.2.6. Can I rule out the issue is on these? Is there anything else I can do to be able to install deasync?
Thanksss!
Using Yarn worked
@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.
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