升级到Ionic 2.2.0,现在遇到有关Opaquetoken和ModulewithProviders的错误



我已从离子2.0.0-rc3升级到2.2.0。为此,我遵循有关其更改日志的说明,网址为https://github.com/driftyco/ionic/blob/master/master/changelog.md并更新了我的package.json

如果我现在运行离子服务,那么我会在跨阶段看到错误。我不知所措,因为我对不透明的或ModulewithProviders一无所知,而我的搜索尚未透露任何东西。

MacBook-Pro-3:project chris$ ionic serve
> ionic-hello-world@ ionic:serve /Users/chris/Documents/ionic/project
> ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8102" "--livereload-port" "35731"
[16:25:37]  ionic-app-scripts 1.1.4 
[16:25:37]  watch started ... 
[16:25:37]  build dev started ... 
[16:25:37]  clean started ... 
[16:25:37]  clean finished in 1 ms 
[16:25:37]  copy started ... 
[16:25:37]  transpile started ... 
[16:25:40]  typescript: Users/chris/node_modules/@ionic/cloud-angular/dist/es5/index.d.ts, line: 39 
            Cannot find name 'OpaqueToken'. 
[16:25:40]  typescript: Users/chris/node_modules/@ionic/cloud-angular/dist/es5/index.d.ts, line: 50 
      L39:  export declare const CloudSettingsToken: OpaqueToken;
      L40:  export declare function provideContainer(settings: CloudSettings): DIContainer;
            Cannot find name 'ModuleWithProviders'. 
      L49:  export declare class CloudModule {
      L50:      static forRoot(settings: CloudSettings): ModuleWithProviders;
[16:25:40]  transpile failed 
[16:25:40]  dev server running: http://localhost:8102/ 
[16:25:40]  watch ready in 2.83 s 
[16:25:40]  copy finished in 2.82 s 

我设法通过执行以下

来解决此问题
npm install @ionic/cloud-angular --save
ionic platform remove ios
remove the node_modules directory
npm install

voila!

相关内容

  • 没有找到相关文章

最新更新