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

Node 14: Warning: Accessing non-existent property 'INVALID_ALT_NUMBER' of module exports inside circular dependency #19

Closed
alcuadrado opened this issue May 25, 2020 · 10 comments

Comments

@alcuadrado
Copy link
Contributor

When using this parser on Node 14, I get this warnings:

pato@pmbp:14% node --trace-warnings node_modules/.bin/buidler test
(node:2572) Warning: Accessing non-existent property 'INVALID_ALT_NUMBER' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:823:11)
    at Object.get (internal/modules/cjs/loader.js:837:5)
    at Object.<anonymous> (/private/tmp/14/node_modules/@solidity-parser/parser/dist/antlr4/RuleContext.js:32:46)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.<anonymous> (/private/tmp/14/node_modules/@solidity-parser/parser/dist/antlr4/PredictionContext.js:10:19)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
(node:2572) Warning: Accessing non-existent property 'INVALID_ALT_NUMBER' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:823:11)
    at Object.get (internal/modules/cjs/loader.js:837:5)
    at Object.<anonymous> (/private/tmp/14/node_modules/@solidity-parser/parser/dist/antlr4/tree/Trees.js:15:49)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.<anonymous> (/private/tmp/14/node_modules/@solidity-parser/parser/dist/antlr4/RuleContext.js:126:13)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
@fvictorio
Copy link
Contributor

Thanks for reporting this! Seems to be a problem upstream: antlr/antlr4#2834

@stfl
Copy link

stfl commented Aug 27, 2020

I am seeing the same issue. when will this be fixed?

@fvictorio
Copy link
Contributor

Hey @stfl, this depends on the fix for the linked antlr issue being published.

@chapati23
Copy link

FYI: Looks fixed in the upstream repo now!
antlr/antlr4#2834 (comment)

@fvictorio
Copy link
Contributor

It seems like that change will be part of 4.9, which doesn't seem to be released.

@chapati23
Copy link

chapati23 commented Nov 10, 2020

you're right, looks like we'll need to wait for antlr@4.9 release
i wrongly assumed it was already released 🙈

here's the 4.9 milestone link to track it: https://github.com/antlr/antlr4/milestone/20

@fvictorio
Copy link
Contributor

Ok, I just used the unreleased version and it seems like it worked. But it was a HUGE change, so I published it under a rc for now. If someone wants to give it a try, npm i @solidity-parser/parser@rc. I tried it in prettier solidity and it worked fine.

cc @cgewecke @fernandomg

@prestwich
Copy link

prestwich commented Feb 5, 2021

An idea when we'll get an official release? With apple silicon, using v15.3.0 or later is now basically mandatory (due to this issue)

edit: ah, looks like you have the updated antler, and it's eth-gas-reporter that needs to tag a new release now?

@fvictorio
Copy link
Contributor

@prestwich yes, eth-gas-reporter seems to be on ^0.8.2, and I think I fixed this on a later version (don't remember exactly which one now).

cc @cgewecke

@cgewecke
Copy link

cgewecke commented Feb 8, 2021

@fvictorio Ah! Thanks for the ping. Will fix rn.

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