juanfranblanco / vscode-solidity

Visual Studio Code language support extension for Solidity smart contracts in Ethereum https://marketplace.visualstudio.com/items?itemName=JuanBlanco.solidity
MIT License
904 stars 194 forks source link

Cannot Go to Definition of "@openzepplin" imports #295

Open jtwigg opened 3 years ago

jtwigg commented 3 years ago

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

markokhman commented 2 years ago

Having the very same issue here

valle-xyz commented 2 years ago

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

zatoichi0826 commented 1 year ago

Having the very same issue here