![](/img/trans.png)
[英]'Expected 1-3 arguments but got 0' error when doing ng build --prod
[英]“PickerCmp.html(13,71): Expected 0 arguments, but got 1” When i run IONIC BUILD --PROD
我試圖用離子構建一個 pwa 應用程序,當我運行“離子構建”時,一切正常。 但是當我運行“ionic build --prod”時,會返回這個錯誤:
node_modules/ionic-angular/umd/components/picker/picker-component.d.ts.PickerCmp.html(13,71) 中的錯誤:預期為 0 arguments,但得到 1. node_modules/ionic-angular/umd/components/input /input.d.ts.TextInput.html(1,928):預期為 0 arguments,但得到 1. node_modules/ionic-angular/umd/components/input/input.d.ts.TextInput.html(1,961):預期為 0 arguments ,但得到 1。
你應該卸載離子角
npm uninstall ionic-angular
然后將所有導入從 ionic-angular 替換為 @ionic/angular
npm 卸載離子角
然后在所有導入中替換“@ionic/angular”。
你可能在“@ionic/angular”中找不到 ViewController - 所以不要依賴它。
我在 Angular 8 和使用 iOnic 4 時遇到過這個問題。
它適用於 Angular 7 - 無需更改相同版本的離子版本。
使用命令檢查您的離子版本 -
離子信息
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.