Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'solidity-parser-antlr/dist/index.cjs.js'. Please verify that the package.json has a valid "main" entry #41

Open
cameel opened this issue Jul 11, 2021 · 5 comments

Comments

@cameel
Copy link

cameel commented Jul 11, 2021

I wanted to try out the framework but I'm getting an error immediately after installing it with npm:

npm install eth-saddle
npx saddle help
Error: Cannot find module '/tmp/saddle/node_modules/solidity-parser-antlr/dist/index.cjs.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:347:19)
    at Function.Module._findPath (node:internal/modules/cjs/loader:560:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:913:27)
    at Function.Module._load (node:internal/modules/cjs/loader:772:27)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (/tmp/saddle/node_modules/@compound-finance/sol-tracing-utils/src/collect_coverage_entries.ts:3:1)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (/tmp/saddle/node_modules/@compound-finance/sol-tracing-utils/src/index.ts:34:1)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (/tmp/saddle/node_modules/@compound-finance/sol-coverage/src/coverage_subprovider.ts:1:1)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)

I see that solidity-parser-antlr is now at 0.13.2 while package.json of the framework still refers to 0.4.11.

Environment

  • OS: Arch Linux
  • node.js version: v16.4.2
  • npm version: 7.17.0
  • saddle version: 0.1.24-alpha1 (this is what npm currently installs)
@bingen
Copy link

bingen commented Oct 28, 2021

I’m getting the same error, while trying to do saddle import.

My environment is:

  • OS: linux
  • node.js version: v16.8.0
  • npm version: 7.21.01
  • saddle version: 0.1.25

@edmulraney
Copy link

Horrible work around:

cd node_modules/solidity-parser-antlr
npm run build
npm run copy-files

@DBLTecnologia
Copy link

Unfortunately @edmulraney solution didn't worked for me.

My environment is:

OS: Ubuntu 18
node.js version: v14.20.0
npm version: 8.15.1
saddle version: 0.1.25

@neon-smart-contract-dev

cd node_modules/solidity-parser-antlr
npm i
npm run build
npm run copy-files

@irfanshaik11
Copy link

hi, having this exact issue on a mac m1, @neon-smart-contract-dev and @edmulraney solution didn't work for me.

Pinging in case anyone has the answer!

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

No branches or pull requests

6 participants