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.

The latest version can't be installed with node v12.19.0 and npm v6.14.8

See original GitHub issue

Hey @davidmurdoch,

I’ve seen multiple reports of npm failing to install ganache-core lately. Initially I couldn’t reproduce it until I switched to node 12.

This is a pretty weird error, as running npm init -y && npm i ganache-core doesn’t fail. But if you have a project with a package.json and package-lock.json that already have ganache-core, you get this error:

pato@pmbp /t/npmproject-3> npm i
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/ganache-core/node_modules/web3-provider-engine/node_modules/eth-sig-util/ethereumjs-abi@git+https:/github.com/ethereumjs/ethereumjs-abi.git" as it does not contain a package.json file.

This may be a bug in npm/node, but you could avoid it by upgrading web3-provider-engine, as it doesn’t use a git-based dependency anymore.

We haven’t touched the ethereumjs/ethereumjs-abi repo in a long time, and it does contain a package.json. So I’m inclined to think that it’s npm’s fault.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
davidmurdochcommented, Oct 26, 2020
1reaction
drptblcommented, Oct 22, 2020

@davidmurdoch @alcuadrado I was able to fix this by removing: ethereumjs-abi@ prefix from: ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git (all occurencies) which results in: git+https://github.com/ethereumjs/ethereumjs-abi.git in package-lock.json (in your case it would be npm-shrinkwrap.json)

Everything seems to work now.

To reproduce you can do these steps:

  1. git pull https://github.com/Synthetixio/kwenta
  2. git checkout update-synthetixiojs
  3. npm install => fails with error above

now if you open package-lock.json and edit (as described above): ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git (all occurencies) to git+https://github.com/ethereumjs/ethereumjs-abi.git and run npm install again, everything works and package-lock.json is not modified after it.

Created PR for this with a fix: #653

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm does not support Node.js v12.18.3 - Stack Overflow
The problem seemed to be that whenever I tried to install the latest version of node, npm wasn't upgraded and npm v6.4.1 only...
Read more >
Downloading and installing Node.js and npm
We strongly recommend using a Node version manager like nvm to install Node.js and npm ... Note: to download the latest version of...
Read more >
How to Install Node.js and npm on Ubuntu 20.04 - Linuxize
This is the easiest way to install Node.js and npm on Ubuntu and should be sufficient for most use cases. The version included...
Read more >
How to fix 'npm does not support Node.js v14' error on ...
Uninstall node.js (Windows Add/Remove programs) · Manually delete the npm folder from your user profile (%APPDATA%/roaming/npm) · Install node.js ...
Read more >
How To Install Node.js on Ubuntu 20.04 - DigitalOcean
using apt to install the nodejs package from Ubuntu's default software ... This will not be the latest version, but it should 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