Ionic-cli: 'ionic-app-scripts' is not recognized

Created on 31 Dec 2016  路  12Comments  路  Source: ionic-team/ionic-cli

Short description of the problem:

'ionic-app-scripts' is not recognized when trying to ionic serve/build

What behavior are you expecting?

Ionic to build.

Steps to reproduce:

  1. I had some computer issues, so I did windows startup fix tool.
  2. My computer worked.
  3. I tried to run my app again (it worked before) using ionic serve and before build I get the following error:

'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"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! c:xampphtdocsthemillnpm-debug.log
There was an error serving your Ionic application: There was an error with the spawned command: serve

Post the output of ionic info below please
ordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.4
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
Ionic App Scripts Version: 0.0.47
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.9.2
Xcode version: Not installed

Most helpful comment

This is the issue with node_modules, are not installed in your app
Please install node modules in your application
Go to your application root in command line, and enter the following command.
npm install

All 12 comments

Perhaps related to npm #14626?

try these 2 step, it's working on my system.

  • Run this command on root directory of project: npm install @ionic/app-scripts@latest --save-dev
  • Rename .srcappmain.dev.ts with .srcappmain.ts

not working for me

@ibrahimker can you tell me error description?

@KashifAhmed exactly same problem like posted by theunreal and try your solution, but the problem still happen :(

Edit:
Solved by doing npm rebuild node-sass. Seems that after installing latest app-scripts in my computer, I also need to rebuild the node-sass for correct reference. Thanks Kashif :D

This is the issue with node_modules, are not installed in your app
Please install node modules in your application
Go to your application root in command line, and enter the following command.
npm install

but you need to delete node_modules before you typing npm install

not working for me..

Not working for me ;( So sad.

it's solved..( npm install @ionic/app-scripts@latest --save-dev )
but new problem I have faced can not find name 'google'

delete the node_modules, then run npm install
it worked for me

It usually happens when I move the ionic file to another PC or OS. Just delete node_modules and run npm install. Worked like charm :). Try to use github to transfer file. It's better that way

Was this page helpful?
0 / 5 - 0 ratings