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'
18 Answers
Try installing app-script from npm
npm i @ionic/app-scripts
4 Comments
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!
11 Comments
npm i @ionic/app-scripts in NodeJS v8 works fine.I was facing same issue, here is what I did-
- Removed node_modules from directory (Manually).
- open project dir
- run this command-
npm install
That fixed those errors for me.
Comments
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).
Comments
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 Comment
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.
Comments
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
Comments
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 [email protected]"
The last one because ionic build was giving me an error on that package after the audit