所以,我正在做一个角度项目,最近我在运行npm start时开始面对这个问题。如果复制旧的node-modules文件夹,但只有当我执行新的npm install时,我才不会面临这个问题。最近我没有看到我的package.json文件有任何变化。但是,当我运行npm start时,我会得到以下错误:
ERROR in node_modules/ang-jsoneditor/jsoneditor/jsoneditor.component.d.ts(13,9): error TS1086: An accessor cannot be declared in an ambient context.
我试着安装typescript的最新版本,但这似乎与我正在使用的角-cli版本不兼容。此外,我试图安装jsoneditor和ang-jsoneditor的最新版本。
我不确定这是由于某些版本错配或由于其他错误。
这里是我的package.json的一个片段。
{
"name": "Project",
"version": "2.0.0",
"license": "MIT",
"dependencies": {
"@angular/animations": "^7.2.12",
"@angular/cdk": "~7.1.0",
"@angular/common": "^7.2.12",
"@angular/compiler": "^7.2.12",
"@angular/core": "^7.2.12",
"@angular-devkit/build-angular": "~0.11.0",
"@angular/cli": "^7.3.8",
"@angular/compiler-cli": "^7.2.12",
"ang-jsoneditor": "^1.9.4",
"jsoneditor": "^5.34.0",
"typescript": "^3.2.4"
}
}任何帮助都是非常感谢的。
https://stackoverflow.com/questions/61751256
复制相似问题