Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

fix: ethereumjs-abi ENOLOCAL error #653

Closed

Conversation

drptbl
Copy link

@drptbl drptbl commented Oct 22, 2020

@drptbl
Copy link
Author

drptbl commented Oct 22, 2020

Not sure why tests on CI has failed, doesn't seem related (macOS Node 10 & 12). I'm using macOS and Node 12 myself and they pass on my local machine, so I suspect flaky tests.

@davidmurdoch
Copy link
Member

Thanks @drptbl! Because of the way npm treats shrinkwraps*, this PR won't actually fix the issue once the package is published.

So, what i'm going to do for today is create a release with your fix by manually editing the shrinkwrap before it published to npm. I hope to upstream a fix this week so ganache no longer relies on this git package.

Thanks for this PR, btw... it really is saving me some extra headache! I close this issue once I'm finished with this manual release.

  • if we publish the npm-shrinkwrap.json as is, when a user runs npm install ganache-core npm will install all of ganache's devDependencies, despite them being marked as "dev": true in the npm-shrinkwrap.json. So what we do on pre-publish is npm prune --production and then run npm shrinkwrap to recreate the shrinkwrap with only production dependencies. This restores the buggy ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git URL.

note: I'm using npm v7 to maintain the shrinkwrap file due to another npm v6 bug that creates entries in the npm-shrinkwrap.json that omits package some urls... urls that npm will attempt to use on npm install ganache-core, which causes npm to just crash.

@davidmurdoch
Copy link
Member

Update: this npm v7 issue is making it tricky to publish: npm/cli#2045

@davidmurdoch
Copy link
Member

I've published a beta and it looks like the fix works!

https://www.npmjs.com/package/ganache-core/v/2.13.1-beta.1

@drptbl, @alcuadrado do you mind installing this version out and letting me know if you have any issues?

@drptbl
Copy link
Author

drptbl commented Oct 26, 2020

@davidmurdoch Indeed issue is fixed. Just tested. Thanks 👍.

@davidmurdoch
Copy link
Member

Fixed in 2.13.1 https://www.npmjs.com/package/ganache-core/v/2.13.1

@drptbl drptbl deleted the fix/ethereumjs-abi-ENOLOCAL branch October 26, 2020 16:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants