openzeppelin-solidity imports are highlighted red (but compile fine)
See original GitHub issueI use openzeppelin-solidity
package in my project (installed with npm install --save openzeppelin-solidity
), and my smart contract file has this line:
import "openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol";
VS Code highlights import
in red with the error Source "openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol" not found
Everything compiles and works fine, it’s just annoying to see an error. Anything can be done about that?
Issue Analytics
- State:
- Created 5 years ago
- Comments:18 (1 by maintainers)
Top Results From Across the Web
VScode Solidity extension - not finding openzepplin imports
Even though vscode shows red squigglies I can compile successfully via hardhat compile. If I change the path to. import "../node_modules/@ ...
Read more >Trouble importing OpenZeppelin Contracts into VS Code
Long story short I'm new and I've been developing a project that compiles fine before I add an import statement to one of...
Read more >How to Import Solidity Files in VS Code with IDE Support
I coped with the red screaming squiggly lines. I learned to ignore and . ... import "openzeppelin-solidity/contracts/math/SafeMath.sol";.
Read more >Editor and error list reports non-existent errors about missing ...
I have double checked the the references are added, and the code compiles and runs just fine, but a bunch of stuff gets...
Read more >Sudden errors on Visual Studio Code Imports - Ionic Framework
So previously an import such as: import { myService } from "src/app/co… ... work fine - but all my components are now riddled...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For that scenario you need your user settings as following:
@djneely @aleybovich
Say your repo structure looks like this (
openzeppelin-solidity
is innode_modules
):If you open vscode at the root level, you should config like: