Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

File './node_modules/ganache-core/package.json' after upgrade 6.1 -> 6.2 #595

Closed
webmaster128 opened this issue Nov 20, 2018 · 3 comments
Closed

Comments

@webmaster128
Copy link

After upgrading ganache-cli from 6.1.8 to 6.2.1, starting the cli fails with

Error: Cannot find module './node_modules/ganache-core/package.json'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
    at Function.Module._load (internal/modules/cjs/loader.js:506:25)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/me/project/node_modules/ganache-cli/cli.js:11:15)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
    at startup (internal/bootstrap/node.js:285:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
  • I asked about this on gitter: [ ]

Expected Behavior

"$REPO_ROOT/node_modules/.bin/ganache-cli" -p 7545 -i 5777 -m "$GANACHE_MNEMONIC" > /dev/null &

works

Current Behavior

"$REPO_ROOT/node_modules/.bin/ganache-cli" -p 7545 -i 5777 -m "$GANACHE_MNEMONIC" > /dev/null &

fails with the error above

Possible Solution

This is probably related to the path of the binary, which changed in trufflesuite/ganache@d1f654d

Making assumptions on other module's installation path is probably no good idea in general.

Steps to Reproduce (for bugs)

  1. cd / (or some other place outside of the project)
  2. Run /full/path/to/project/node_modules/.bin/ganache-cli --help

Context

Tries to upgrade dependencies in iov-one/iov-core#544

Your Environment

  • Version used: 6.2.1
  • Version of Truffle/Remix/Other tools used:
  • NodeJS Version: [ ] 6.x, [ ] 7.x (unsupported), [ ] 8.x, [ ] 9.x, [x] 10.x
  • Operating System and version (include distro if Linux): macOS
  • Link to your project or repro gist: https://github.com/iov-one/iov-core
  • Commit hash to use with above link for reproduction: Upgrade dependencies iov-one/iov-core#544
  • I intend to submit a pull request to fix this issue: [ ]
@LucasIsasmendi
Copy link

And this ganache version adds the fix to ganache-core that allows receive messages: Ganache shouldn't assume that every transaction with data is a contract call

@davidmurdoch
Copy link
Member

Thanks @webmaster128! ganache-cli itself is no longer being webpacked, which is why this bug was uncovered with this latest release. Fixed in trufflesuite/ganache#594. I'll push out a new release for this today.

lbeder referenced this issue in orbs-network/orbs-ethereum-contracts-v1 Nov 22, 2018
@davidmurdoch
Copy link
Member

davidmurdoch commented Nov 22, 2018

@webmaster128 This fix for this is live in https://github.com/trufflesuite/ganache-cli/releases/tag/v6.2.3

Sorry this took a bit longer than I thought it would. Thanks again for filing the report!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants