2017-03-27 50 views
0

我試圖安裝應用程序腳本,我得到這個錯誤。它搞砸了我的環境,我不能再使用ionic serve應用程序腳本搞砸了我的離子配置

你能幫忙嗎?

$ npm install @ionic/app-scripts --save-dev 
[email protected] /home/louisro/Documents/mobileApps/BoardLine/ionic2_version 
├── @ionic/[email protected] 
└── UNMET PEER DEPENDENCY [email protected] 

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modules/chokidar/node_modules/fsevents): 
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 
npm WARN @ionic/[email protected] requires a peer of [email protected]~2.2.1 but none was installed. 


$ ionic info 

Your system information: 

Cordova CLI: 6.5.0 
Ionic Framework Version: 2.2.0 
Ionic CLI Version: 2.2.1 
Ionic App Lib Version: 2.2.0 
Ionic App Scripts Version: 1.2.1 
ios-deploy version: Not installed 
ios-sim version: Not installed 
OS: Linux 4.4 
Node Version: v7.4.0 
Xcode version: Not installed 
+0

嘗試npm install @ ionic/app-scripts @ latest –

+0

請參閱此[starter app package.json](https://github.com/driftyco/ionic2-app-base/blob/master/package.json)。將它設置爲1.1.4 –

+0

@SuryaTeja首先就是搞砸了。 – Louis

回答

1

看起來你已經有了一個UNMET PEER DEPENDENCY嘗試打字稿腳在你的package.json兼容的版本。

@ ionic/app-scripts @ 1.2.1需要[email protected]~2.2.1的同伴,但沒有安裝任何軟件。

嘗試釘住的版本,以確保node_modules後執行以下命令重新安裝rm -rf node_modules && npm cache clean && npm install