vscode-solidity icon indicating copy to clipboard operation
vscode-solidity copied to clipboard

Cannot Go to Definition of "@openzepplin" imports

Open jtwigg opened this issue 3 years ago • 3 comments

When importing like this

import "@openzeppelin/contracts/utils/Strings.sol";

I cannot Go To Definition.

However if I import like this:

import "../node_modules/@openzeppelin/contracts/utils/Strings.sol";

then this works.

How can I get it to understand the pathing? PS: I've got this in the settings as hinted at elsewhere and it still doesn't work:

    "solidity.packageDefaultDependenciesContractsDirectory": "",
    "solidity.packageDefaultDependenciesDirectory": "node_modules",

image

jtwigg avatar Nov 05 '21 04:11 jtwigg

Having the very same issue here

markokhman avatar Jan 19 '22 07:01 markokhman

@jtwigg @markokhman Which package manager do you use? pnpm? Can you remove node_modules and install again with npm and report back?

valle-xyz avatar Feb 10 '22 10:02 valle-xyz

Having the very same issue here

zatoichi0826 avatar Aug 09 '23 04:08 zatoichi0826