typescript 找不到文件'.../node_modules/@nomicfoundation/hardhat-core/src'

3vpjnl9f  于 2022-11-18  发布在  TypeScript
关注(0)|答案(1)|浏览(109)

我设置了一个typescript hardhat项目,它工作正常,但在/***/node_modules/@nomicfoundation/hardhat-chai-matchers/src/tsconfig.json中:

{
  "extends": "../../../config/typescript/tsconfig.json",
  "compilerOptions": {
    "outDir": "../",
    "rootDirs": ["."],
    "composite": true,
    "types": ["node", "chai"]
  },
  "include": ["./**/*.ts"],
  "exclude": [],
  "references": [
    {
      "path": "../../hardhat-core/src"
    },
    {
      "path": "../../hardhat-ethers/src"
    }
  ]
}

references字段被突出显示,显示为File '***/node_modules/@nomicfoundation/hardhat-core/src' not found.,但实际上它并不存在。如何解决这个问题?

n3ipq98p

n3ipq98p1#

使用“npm安装--保存-开发@nomicfoundation/硬件工具箱”

相关问题