2017-12-27 464 views
1

我的離子3的配置是 「@離子/應用程序的腳本」: 「3.1.1」, 「打字原稿」: 「2.4.2」離子3機器人生成BuildError.Error

和依賴關係是

「@ angular/common」:「5.0.1」, 「@ angular/compiler」:「5.0.1」, 「@ angular/compiler-cli」:「5.0.1」, 「@ angular /核心「:」5.0.1「, 」@ angular/forms「:」5.0.1「, 」@ angular/http「:」5.0.1「, 」@ angular/platform-b​​rowser「:」5.0。 1「, 」@ angular/platform-b​​rowser-dynami 「ion-native/camera」:「^ 4.5.2」, 「@ ionic-native/call-number」:「^ 4.5.2」, 「@ ionic- native/native/core「:」4.3.1「, 」@ ionic-native/splash-screen「:」4.4.0「, 」@ ionic-native/status-bar「:」4.4.0「, 」@離子/應用程序的腳本「: 」3.1.1「, 」@離子/存儲「: 」2.1.3「,

我離子三期工程與

ionic cordova build --release android and 
ionic cordova build android 

成功打造210

不建,它會產生誤差

Error: ./node_modules/Rxjs/observable/BoundNodeCallbackObservable.js 
Module build failed: TypeError: Cannot read property 'type' of undefined 
at Object.getEffectiveTypeAnnotationNode 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:9341:17) 
at assignContextualParameterTypes 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:41652:25) 
at checkFunctionExpressionOrObjectLiteralMethod 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:41948:29) 
at checkExpressionWorker 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:42959:28) 
at checkExpression 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:42898:42) 
at checkExpressionCached 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:42779:38) 
at checkReturnStatement 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:45418:54) 
at checkSourceElement 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:46763:28) 
at Object.forEach 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:1506:30) 
at checkBlock 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:44563:16) 
@ ./node_modules/Rxjs/observable/bindNodeCallback.js 2:36-76 
@ ./node_modules/Rxjs/add/observable/bindNodeCallback.js 
@ ./node_modules/Rxjs/rx.js 
@ ./src/pages/page3/page3.ts 
@ ./src/app/app.module.ts 
@ ./src/app/app.module.ngfactory.js 
@ ./src/app/main.ts,./node_modules/Rxjs/observable/BoundCallbackObservable.js 
Module build failed: TypeError: Cannot read property 'type' of undefined 
at Object.getEffectiveTypeAnnotationNode 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:9341:17) 
at assignContextualParameterTypes 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:41652:25) 
at checkFunctionExpressionOrObjectLiteralMethod 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:41948:29) 
at checkExpressionWorker 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:42959:28) 
at checkExpression 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:42898:42) 
at checkExpressionCached 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:42779:38) 
at checkReturnStatement 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:45418:54) 
at checkSourceElement 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:46763:28) 
at Object.forEach 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:1506:30) 
at checkBlock 
(C:\Users\JOHN\demoapp\node_modules\typescript\lib\typescript.js:44563:16) 
@ ./node_modules/Rxjs/observable/bindCallback.js 2:32-68 
@ ./node_modules/Rxjs/add/observable/bindCallback.js 
@ ./node_modules/Rxjs/rx.js 
@ ./src/pages/page3/page3.ts 
@ ./src/app/app.module.ts 
@ ./src/app/app.module.ngfactory.js 
@ ./src/app/main.ts 
at BuildError.Error (native) 
at new BuildError (C:\Users\JOHN\demoapp\node_modules\@ionic\app-scripts\dist\util\errors.js:16:28) 
at callback (C:\Users\JOHN\demoapp\node_modules\@ionic\app-scripts\dist\webpack.js:121:28) 
at emitRecords.err (C:\Users\JOHN\demoapp\node_modules\@ionic\app-scripts\node_modules\webpack\lib\Compiler.js:265:13) 
at Compiler.emitRecords (C:\Users\JOHN\demoapp\node_modules\@ionic\app-scripts\node_modules\webpack\lib\Compiler.js:371:38) 
at emitAssets.err (C:\Users\JOHN\demoapp\node_modules\@ionic\app-scripts\node_modules\webpack\lib\Compiler.js:258:10) 
at applyPluginsAsyncSeries1.err (C:\Users\JOHN\demoapp\node_modules\@ionic\app-scripts\node_modules\webpack\lib\Compiler.js:364:12) 
at next (C:\Users\JOHN\demoapp\node_modules\tapable\lib\Tapable.js:218:11) 
at Compiler.compiler.plugin (C:\Users\JOHN\demoapp\node_modules\@ionic\app-scripts\node_modules\webpack\lib\performance\SizeLimitsPlugin.js:99:4) 
at Compiler.applyPluginsAsyncSeries1 (C:\Users\JOHN\demoapp\node_modules\tapable\lib\Tapable.js:222:13) 
+0

你可以顯示你的'package.json'嗎? – Sampath

回答

1

您需要使用@ionic/app-scripts3.1.1。這是3.1.0上的一個錯誤。

你可以看到它here

+0

它給了我錯誤as => UNMET PEER DEPENDENCY @ ionic-native/core @ 4.4.0 –

+0

你可以顯示整個錯誤信息嗎?把它放在你的問題上面。 – Sampath

+0

你可以用'「@ ionic-native/core」:「4.3.1」,'。你需要刪除'^'。你需要像這樣使用:https://github.com/ionic-team/ionic-conference-app/blob/master/package.json然後刪除'node_modules'文件夾並運行'npm i' – Sampath