我正在使用 yarn 3.5.0。安装任何包后,我在项目根目录中看不到任何 node_modules 目录。问题是什么?是自然的吗?我收到类似未找到节点模块的错误。怎么解决??
我的步骤:
yarn init -y
yarn add <packages>
yarn hardhat
结果文件和目录:
Hardhat 是我安装的包之一。
错误:
[{
"resource": "/home/abinash/Desktop/Nft/onchain-allowlist/contracts/OnchainAllowlist.sol",
"owner": "solidity-language-server",
"code": "6275",
"severity": 8,
"message": "Source \"@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol\" not found: File not found. Searched the following locations: \"\".",
"source": "solidity",
"startLineNumber": 4,
"startColumn": 1,
"endLineNumber": 4,
"endColumn": 79
}]
因为没有node_modules。