I'm new to Ionic. I was following the Ionic documentation "get started", created a project sample named "super". The problem is that when I run the command line ionic serve
in the project directory, it threw an error Error: Cannot find module '@ionic/app-scripts'

- 13
- 4

- 483
- 1
- 4
- 10
18 Answers
Try installing app-script from npm
npm i @ionic/app-scripts

- 3,836
- 3
- 15
- 28
-
9this is far more better solution than downgrading nodejs – Prageeth godage Aug 24 '17 at 06:27
-
if i will not use sudo then it will show permission issue . – Anuj May 17 '18 at 07:31
-
@SAJ sir i am using node 11 version but still error what i do sir for fix above error? – Kapil Soni Apr 22 '19 at 09:38
-
Try to run "npm audit fix --force" after running @Sathyajith command, worked with node v12.18.0. – Filipe Madureira Jun 10 '20 at 11:53
To get the latest @ionic/app-scripts
, run the following command:
npm install @ionic/app-scripts@latest --save-dev

- 1,282
- 19
- 18
app-scripts currently compatible with node 6 and 7. İf you installed node 8, then please uninstall and install node 6 stable version. This solved error and now i can use ionic 3, angular 4 . Take care!

- 437
- 1
- 6
- 18

- 284
- 1
- 5
-
hello i am installing Node v6.11.3 but not work ,still give this error – The Ray of Hope Sep 10 '17 at 08:08
-
2After downgrade from 8 to 6 you will need to run npm i @ionic/app-scripts (even if you had run it before) that worked for me – itay Oct 20 '17 at 17:57
-
9If you dont want node 8 to be uninstalled, then try this which worked for me .Run this command in terminal 'npm install @ionic/app-scripts@latest --save-dev' – MaryAnn Dec 04 '17 at 05:29
-
Thanks @softdevac I just downgraded to node 7.10.1 and it worked like a charm. – Ian Mbae Dec 21 '17 at 07:45
-
2No need to downgrade NodeJS version. running `npm i @ionic/app-scripts` in NodeJS v8 works fine. – Jake Pucan Feb 14 '18 at 08:02
-
2It would be beneficial to include the commands to uninstall the current version of node and install the version needed for convenience. – Stephen Romero Mar 19 '18 at 16:26
-
Don't downgrade node, instead of that upgrade app-scripts. Using the following command "npm install @ionic/app-scripts@latest --save-dev", it worked for me. – Ananta Prasad Jun 18 '18 at 10:06
-
In my case I had set `NODE_ENV=production` in my terminal. To check value of NODE_ENV, `echo $NODE_ENV`, change it back to development with `NODE_ENV=development`. – desigNerd Mar 20 '19 at 00:57
-
1@softdevac: sir i am using node 11 version but still got same error what i do sir? – Kapil Soni Apr 22 '19 at 09:31
-
1This answer is not acceptable. Now we have node.js Version 10; we should not downgrade node, instead, we should upgrade that script using " npm install @ionic/app-scripts@latest --save-dev" as others suggested here, then "npm audit fix --force" but I still did not quite get it working using Node V 10. – J D Jul 03 '19 at 23:31
-
Downgrading node is not a solution in 2020. Node v6 or v7 won't even let you run any script without upgrading to a stable LTS version which of course isn't compatible with app-scripts. I managed to get it to work with the current node version, 12. I ran "npm install @ionic/app-scripts@latest --save-dev" first and then "npm audit fix --force". Thanks @J D. – Filipe Madureira Jun 10 '20 at 11:46
do not downgrade the node version, update the version of "app-scripts":
To get the latest @ionic/app-scripts, please run:
npm install @ionic/app-scripts@latest --save-dev

- 341
- 3
- 6
I had this issue , i solved it by deleting node_modules/ folder and ran the command npm install
now my app works

- 703
- 2
- 13
- 31
I tried every non-downgrade solution mentioned in this thread, in all kinds of ways and none of them worked. With nothing left to lose, I went down the downgrade route (I used sudo apt-get purge --auto-remove nodejs
to remove previous 8.x version and then installed the last stable ver on the 6.x branch using the nodesource ppa).
Still got the same errors trying to run in the original project folders, but then I created a new project and ionic serve
worked just fine in that space.
FWIW, I did not need to run npm update
or npm i @ionic/app-scripts
afterwards, but I did find it necessary to adopt the habit of running commands with sudo
in front (or you sudo -s
into root account).

- 1,629
- 2
- 12
- 14
I ran into the same issue and i had problems fixing it. However i update my app scripts npm install -g @ionic/app-scripts@latest --save-dev
to the latest version and my problem was solved
npm install -g @ionic/app-scripts@latest --save-dev
Error: app-script not found/ app-script not installed/ app-script module is not found
Try this work for me, Your also:
- npm cache clean --force
- npm install @ionic/app-scripts@latest --save-dev
- npm install -g @angular/cli

- 1,015
- 4
- 14
- 21

- 11
- 2
Just open a new terminal window/session. I could not figure it out, but it's probably related to env.

- 124
- 9
None of the options worked for me. But I could make it work by updating node with npm update After this, the problem was solved and the application started. Good Luck.
I had the same problem and here is what worked for me
I was trying to run the program using VSCode terminal, Instead I used the windows cmd and it ran perfectly. I think the error is in VSCode terminal, it cannot identify the app-scripts module inside the project. Maybe it will be fixed in a later update.

- 562
- 6
- 14
Delete node_modules and package-lock.json
rm -rf node_modules package-lock.json
npm install
Reference: https://github.com/ionic-team/ionic-cli/issues/3399

- 6,961
- 8
- 45
- 71
After half a day trying to solve this And after: python version error node-sass misconfiguration error
I did the following
- Remove node-modules folder
- Run "npm audit fix --force"
- Downgrade webpack installation "npm uninstall webpack && install webpack@3.12.0"
The last one because ionic build was giving me an error on that package after the audit

- 1
- 1
In my case, I need to set NODE_ENV to production then it installs successfully
set NODE_ENV=production
npm install @ionic/app-scripts@latest --save-dev

- 81
- 7
You must create the project as administrator if you have mac or linux uses sudo, if you have windows run the console as administrator and create the project

- 1
- 2