[英]ERROR in ../node_modules/@types/node/assert.d.ts:3:68 - error TS1144: '{' or ';' expected
I am getting this error when trying run the angular application using ng serve
.尝试使用
ng serve
运行角度应用程序时出现此错误。 Here are the details of the project以下是该项目的详细信息
Angular CLI: 8.2.0
Node: 14.19.1
OS: darwin x64
Angular: 8.2.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.802.0
@angular-devkit/build-angular 0.802.0
@angular-devkit/build-optimizer 0.802.0
@angular-devkit/build-webpack 0.802.0
@angular-devkit/core 8.2.0
@angular-devkit/schematics 8.2.0
@angular/cdk 8.1.2
@angular/flex-layout 8.0.0-beta.26
@angular/http 7.2.15
@angular/material 8.1.2
@ngtools/webpack 8.2.0
@schematics/angular 8.2.0
@schematics/update 0.802.0
rxjs 6.4.0
typescript 3.4.5
webpack 4.38.0
I have node version v14.19.1
and "@types/node": "^14.14.31",
.我有节点版本
v14.19.1
和"@types/node": "^14.14.31",
.
I was able to solve this by modifying the version of @types/node
and typescript
in package.json
.我可以通过修改
package.json
中的@types/node
和typescript
的版本来解决这个问题。 So there is version incompatibility between typescript
and @types/node
.因此
typescript
和@types/node
之间存在版本不兼容。 Below is what I am using now in the package.json
.以下是我现在在
package.json
中使用的内容。
"@types/node": "15.6.1",
"typescript": "3.5.3"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.