我在使用tsc的构建中遇到此错误
有人可以检查一下吗?
node_modules/@types/node/index.d.ts:75:11 - error TS2300: Duplicate identifier 'IteratorResult'. 75 interface IteratorResult<T> { }
我正在使用最新的打字稿和@ types / node
我的包json配置
"dependencies": {
"bcrypt": "^3.0.2",
"bluebird": "^3.5.1",
"body-parser": "^1.18.2",
"dotenv": "^6.2.0",
"express": "^4.16.2",
"express-statsd": "^0.3.0",
"express-validator": "^5.3.0",
"hashids": "^1.2.2",
"jsonwebtoken": "^8.4.0",
"mailgun-js": "^0.22.0",
"mysql2": "^1.5.1",
"nyc": "^13.1.0",
"reflect-metadata": "^0.1.10",
"sequelize": "^5.21.7",
"sequelize-typescript": "^1.1.0",
"strong-error-handler": "^2.3.0",
"supertest": "^3.3.0",
"uuid": "^3.3.2"
},
"devDependencies": {
"@types/express": "^4.0.39",
"@types/mocha": "2.2.41",
"@types/node": "12.12.31",
"mocha": "^5.2.0",
"ts-node": "^8.4.1",
"tslint": "^5.8.0",
"typescript": "^3.8.3"
}
有人可以帮我吗?
是否有任何更新?
您尝试过npm install package.json(如果您不使用可视代码终端,则可能需要向文件中添加正确的路径!)
我建议您重新安装软件包。这应该可以解决您的问题。
sudo rm -rf node_modules/ package-lock.json
sudo npm cache clean --force
sudo npm install -D @types/node
sudo npm i --unsafe-perm