简体   繁体   中英

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

i had ionic 4 installed in my windows my apps were working fine but when I downgraded it to ionic 3 it kept giving me errors. so I uninstalled cordova, ionic and nodejs completely and removed node cache and reinstalled everything again but when i run ionic serve it keeps giving me this error in the browser for every previous app I have:

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
.
.
.

i also tried removing node_modules and reinstalling all of them for my apps but did not work.

I have :

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 

well, as you see no one answered! I had to build a new app and start to work again! even copying codes to the new app did not work!!! one of the problems was my node version. I mentioned it in case someone have the same problem and wants to try to solve it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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