简体   繁体   English

../node_modules/@types/node/assert.d.ts:3:68 中的错误 - 错误 TS1144: '{' or ';' 预期的

[英]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/nodetypescript的版本来解决这个问题。 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.

相关问题 node_modules/@fullcalendar/core/main.d.ts(1196,54) 中的错误:错误 TS1144:'{' 或 ';' 预期的 - ERROR in node_modules/@fullcalendar/core/main.d.ts(1196,54): error TS1144: '{' or ';' expected node_modules/mongoose/node_modules/mongodb/mongodb.ts34.d.ts:3288:5 - 错误 TS1005: '?' 预期的 - node_modules/mongoose/node_modules/mongodb/mongodb.ts34.d.ts:3288:5 - error TS1005: '?' expected node_modules/@types/lodash/common/array.d.ts(37,24) 中的错误:错误 TS1005:';' 预期的 - ERROR in node_modules/@types/lodash/common/array.d.ts(37,24): error TS1005: ';' expected 错误 - [tsc] node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.types.d.ts(13,35): 错误 TS1005: ';' 预期的 - Error - [tsc] node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.types.d.ts(13,35): error TS1005: ';' expected node_modules/@types/node/index.d.ts(20,1):错误 TS1084:无效的“引用”指令语法 - node_modules/@types/node/index.d.ts(20,1): error TS1084: Invalid 'reference' directive syntax SPFx Webpart - node_modules/@types/ [prop types] 和 [react] index.d.ts:gulp 构建时加载“错误 TS1005” - SPFx Webpart - node_modules/@types/ [prop types] and [react] index.d.ts: loads of "error TS1005" on gulp build 如何修复Angular 2错误的node_modules/@types/systemjs/index.d.ts(333,13)? - How to fix node_modules/@types/systemjs/index.d.ts (333,13) of Angular 2 error? heroku上传项目出错:../node_modules/mongoose/types/query.d.ts - Error uploading project in heroku: ../node_modules/mongoose/types/query.d.ts Angular 7 node_modules/graphql-tag/lib/index.d.ts(2,57) 中的错误:错误 TS1005:“,”预期 - Angular 7 ERROR in node_modules/graphql-tag/lib/index.d.ts(2,57): error TS1005: ',' expected 目录/node_modules/@antv/g6-core/lib/types/index.d.ts(24,37) 中的 TypeScript 错误:预期类型。 TS1110 - TypeScript error in directory/node_modules/@antv/g6-core/lib/types/index.d.ts(24,37): Type expected. TS1110
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM