升级节点和npm后,我无法启动旧的离子应用程序,这是错误:
± |master U:1 ?:1 ✗| → ionic serve
> ionic-hello-world@ ionic:serve /Users/John/Dropbox/www/salon-app
> ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"
sh: ionic-app-scripts: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! ionic-hello-world@ ionic:serve: `ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the ionic-hello-world@ ionic:serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/John/.npm/_logs/2018-06-16T15_54_50_743Z-debug.log
There was an error serving your Ionic application: There was an error with the spawned command: serve
信息
Your system information:
Cordova CLI: 6.5.0
Ionic Framework Version: 2.2.0
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
ios-deploy version: 1.9.1
ios-sim version: 5.0.13
OS: macOS
Node Version: v10.4.1
Xcode version: Xcode 9.4.1 Build version 9F2000
我尝试删除node_modules
和npm install
,但没有运气。
// LE在运行npm audit
后显示某些软件包出现问题,我试图更新这些软件包
答案 0 :(得分:1)
删除node_modules
并重新安装离子npm install -g cordova ionic
并运行npm audit
以查看哪些软件包已损坏后再次运行。
我不确切地知道修复了什么,但我重复了这个过程并且有效。