正如我从教程pnpm中了解到的那样,.registry.npmjs.org
在node_modules
. 我的项目正在进行中typescript
,我需要@types
在node_modules
. 不过这@types
也有node_modules/.registry.npmjs.org/@types
。所以我收到如下错误:
/node_modules/.registry.npmjs.org/@types/jquery/3.3.5/node_modules/@types/jquery/index.d.ts(32,14): error TS2300: Duplicate identifier 'jQuery'.
...和
/node_modules/@types/jquery/index.d.ts(28,14): error TS2300: Duplicate identifier 'jQuery'.
tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"lib": [
"es5",
"dom",
"es2015.promise"
],
"experimentalDecorators": true,
"sourceMap": true,
"allowSyntheticDefaultImports": true
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules",
"scripts",
"src/contracts"
]
}
任何想法如何解决它?