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 v14 Warning: Accessing non-existent property 'VERSION' #463

Closed
PaulRBerg opened this issue Apr 3, 2021 · 4 comments
Closed

Node v14 Warning: Accessing non-existent property 'VERSION' #463

PaulRBerg opened this issue Apr 3, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@PaulRBerg
Copy link
Contributor

I am shipping prettier-plugin-solidity with my solidity-template. When using the template with node v14 and above, I am getting these warnings:

(node:14555) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
    at emitCircularRequireWarning (node:internal/modules/cjs/loader:698:11)
    at Object.get (node:internal/modules/cjs/loader:712:5)
    at Object.<anonymous> (/Users/paulrberg/workspace/templates/solidity-template/node_modules/sc-istanbul/lib/command/help.js:9:37)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at /Users/paulrberg/workspace/templates/solidity-template/node_modules/sc-istanbul/lib/util/factory.js:56:35
(node:14555) Warning: Accessing non-existent property 'INVALID_ALT_NUMBER' of module exports inside circular dependency
    at emitCircularRequireWarning (node:internal/modules/cjs/loader:698:11)
    at Object.get (node:internal/modules/cjs/loader:712:5)
    at Object.<anonymous> (/Users/paulrberg/workspace/templates/solidity-template/node_modules/@solidity-parser/parser/dist/antlr4/RuleContext.js:32:46)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/Users/paulrberg/workspace/templates/solidity-template/node_modules/@solidity-parser/parser/dist/antlr4/PredictionContext.js:10:19)
(node:14555) Warning: Accessing non-existent property 'INVALID_ALT_NUMBER' of module exports inside circular dependency
    at emitCircularRequireWarning (node:internal/modules/cjs/loader:698:11)
    at Object.get (node:internal/modules/cjs/loader:712:5)
    at Object.<anonymous> (/Users/paulrberg/workspace/templates/solidity-template/node_modules/@solidity-parser/parser/dist/antlr4/tree/Trees.js:15:49)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/Users/paulrberg/workspace/templates/solidity-template/node_modules/@solidity-parser/parser/dist/antlr4/RuleContext.js:126:13)
Creating Typechain artifacts in directory typechain for target ethers-v5
Successfully generated Typechain artifacts!
(node:14555) Warning: Accessing non-existent property 'INVALID_ALT_NUMBER' of module exports inside circular dependency
    at emitCircularRequireWarning (node:internal/modules/cjs/loader:698:11)
    at Object.get (node:internal/modules/cjs/loader:712:5)
    at Object.<anonymous> (/Users/paulrberg/workspace/templates/solidity-template/node_modules/prettier-plugin-solidity/node_modules/antlr4/RuleContext.js:30:46)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/Users/paulrberg/workspace/templates/solidity-template/node_modules/prettier-plugin-solidity/node_modules/antlr4/PredictionContext.js:8:19)
(node:14555) Warning: Accessing non-existent property 'INVALID_ALT_NUMBER' of module exports inside circular dependency
    at emitCircularRequireWarning (node:internal/modules/cjs/loader:698:11)
    at Object.get (node:internal/modules/cjs/loader:712:5)
    at Object.<anonymous> (/Users/paulrberg/workspace/templates/solidity-template/node_modules/prettier-plugin-solidity/node_modules/antlr4/tree/Trees.js:13:49)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/Users/paulrberg/workspace/templates/solidity-template/node_modules/prettier-plugin-solidity/node_modules/antlr4/RuleContext.js:122:13)

You can reproduce this by cloning my template, switching to commit b70050d and running NODE_OPTIONS="--trace-warnings" yarn run test.

I am not sure what is the solution for this. Related:

@mattiaerre
Copy link
Member

oh, interesting. thanks for reporting this issue @PaulRBerg. We'll take a look

@mattiaerre
Copy link
Member

mattiaerre commented Apr 4, 2021

it may be something related to istanbul? gotwarlost/istanbul#940 // cc @fvictorio @Janther @PaulRBerg

@fvictorio
Copy link
Member

This was fixed in the parser a while ago, it shouldn't keep happening :/ @PaulRBerg can you trade upgrading the dependency and check again?

@PaulRBerg
Copy link
Contributor Author

I upgraded, but the warning didn't go away. Looks like solidity-coverage has the same problem.

(node:97946) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
    at emitCircularRequireWarning (node:internal/modules/cjs/loader:698:11)
    at Object.get (node:internal/modules/cjs/loader:712:5)
    at Object.<anonymous> (/Users/paulrberg/workspace/templates/solidity-template/node_modules/sc-istanbul/lib/command/help.js:9:37)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at /Users/paulrberg/workspace/templates/solidity-template/node_modules/sc-istanbul/lib/util/factory.js:56:35
(node:97946) Warning: Accessing non-existent property 'INVALID_ALT_NUMBER' of module exports inside circular dependency
    at emitCircularRequireWarning (node:internal/modules/cjs/loader:698:11)
    at Object.get (node:internal/modules/cjs/loader:712:5)
    at Object.<anonymous> (/Users/paulrberg/workspace/templates/solidity-template/node_modules/solidity-coverage/node_modules/@solidity-parser/parser/dist/antlr4/RuleContext.js:32:46)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/Users/paulrberg/workspace/templates/solidity-template/node_modules/solidity-coverage/node_modules/@solidity-parser/parser/dist/antlr4/PredictionContext.js:10:19)
(node:97946) Warning: Accessing non-existent property 'INVALID_ALT_NUMBER' of module exports inside circular dependency
    at emitCircularRequireWarning (node:internal/modules/cjs/loader:698:11)
    at Object.get (node:internal/modules/cjs/loader:712:5)
    at Object.<anonymous> (/Users/paulrberg/workspace/templates/solidity-template/node_modules/solidity-coverage/node_modules/@solidity-parser/parser/dist/antlr4/tree/Trees.js:15:49)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/Users/paulrberg/workspace/templates/solidity-template/node_modules/solidity-coverage/node_modules/@solidity-parser/parser/dist/antlr4/RuleContext.js:126:13)

Anyways, I'm closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants