繁体   English   中英

ionic serve在“node_modules/@angular/core/src/render3/definition.d.ts”中有Typescript Error

[英]ionic serve has Typescript Error at “node_modules/@angular/core/src/render3/definition.d.ts”

我在我的Windows中安装了离子4我的应用程序工作正常,但当我将它降级为离子3时,它一直给我错误。 所以我完全卸载了cordova,ionic和nodejs,并删除了节点缓存并重新安装了所有内容但是当我运行离子服务时,它一直在浏览器中为我之前的每个应用程序提供此错误:

Typescript Error
'=' expected.
.../app/node_modules/@angular/core/src/di/injector.d.ts
constructor(providers: StaticProvider[], parent?: Injector, source?: string | null);
get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
get(token: any, notFoundValue?: any): any;
Typescript Error
')' expected.
...e /app/node_modules/@angular/core/src/render3/definition.d.ts
* Static attributes to set on host element.
*
* Even indices: attribute name
Typescript Error
Identifier expected.
.../app/node_modules/@angular/core/src/render3/definition.d.ts
* Static attributes to set on host element.
*
* Even indices: attribute name
Typescript Error
';' expected.
...app/node_modules/@angular/core/src/render3/definition.d.ts
* Static attributes to set on host element.
*
* Even indices: attribute name
Typescript Error
Property or signature expected.
...app/node_modules/@angular/core/src/render3/definition.d.ts
* Static attributes to set on host element.
*
* Even indices: attribute name
Typescript Error
'=>' expected.
.../app/node_modules/@angular/core/src/render3/definition.d.ts
* Static attributes to set on host element.
*
* Even indices: attribute name
Typescript Error
Expression expected.
...app/node_modules/@angular/core/src/render3/definition.d.ts
* Given:
* ```
* class MyComponent {
Typescript Error
Expression expected.
.../app/node_modules/@angular/core/src/render3/definition.d.ts
* Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
*
* This allows the render to re-construct the minified and non-minified names
Typescript Error
']' expected.
...app/node_modules/@angular/core/src/render3/definition.d.ts
* Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
*
* This allows the render to re-construct the minified and non-minified names
Typescript Error
',' expected.
.../app/node_modules/@angular/core/src/render3/definition.d.ts
* Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
*
* This allows the render to re-construct the minified and non-minified names
Typescript Error
Property assignment expected.
...app/node_modules/@angular/core/src/render3/definition.d.ts
* Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
*
* This allows the render to re-construct the minified and non-minified names
Typescript Error
Property assignment expected.
...app/node_modules/@angular/core/src/render3/definition.d.ts
* Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
*
* This allows the render to re-construct the minified and non-minified names
Typescript Error
':' expected.
...app/node_modules/@angular/core/src/render3/definition.d.ts
* Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
*
* This allows the render to re-construct the minified and non-minified names
.
.
.

我也尝试删除node_modules并为我的应用程序重新安装所有这些但不起作用。

我有 :

Ionic Framework: 3.9.2
Ionic App Scripts: 3.2.2
Angular Core: ^7.2.9
Angular Compiler CLI: ^7.2.9
Node: 11.12.0
OS Platform: Windows 7
Navigator Platform: Win32
User Agent: Mozilla/5.0 

好吧,你看到没有人回答! 我不得不建立一个新的应用程序,然后重新开始工作! 甚至将代码复制到新的应用程序都不起作用! 其中一个问题是我的节点版本。 我提到它,以防有人有同样的问题,并想尝试解决它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM