I had some computer issue, and when I tried to ng serve
my ionic 2 app I received this error:
c:\xampp\htdocs\themill>ionic serve
ionic-hello-world@ ionic:serve c:\xampp\htdocs\themill ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"
'ionic-app-scripts' is not recognized as an internal or external command, operable program or batch file.
npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\home\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "ionic:serve" "--" "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729" npm ERR! node v6.9.2 npm ERR! npm v4.0.2 npm ERR! code ELIFECYCLE npm ERR! ionic-hello-world@ ionic:serve:
ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ionic-hello-world@ ionic:serve script 'ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the ionic-hello-world package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR!
ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"
I tried to unistall, install, install globally, but it didn't solve. Any ideas what's wrong?
Windows 10.
In my case the problem was that I was working on a mac and attempted to transfer the project to a windows 10 machine. Steps to follow:
npm install @ionic/app-scripts@latest --save-dev
npm rebuild node-sass
to build the binding for your current environment.I don't know what your case is but in my case, the above steps worked.
If your case is different, perhaps the documentaion here:
https://www.npmjs.com/package/@ionic/app-scripts
will help you get started.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With