![](/img/trans.png)
[英]ERROR in node_modules/ng2-toastr/src/toast-container.component.d.ts(1,48): TS2305- /node_modules/@angular/core/core"' has no exported member
[英]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.