Note: for support questions, please use one of these channels:
https://forum.ionicframework.com/
http://ionicworldwide.herokuapp.com/
Note: for build related issues you can open up an issue on the ionic-app-scripts repo
https://github.com/driftyco/ionic-app-scripts
Please ensure that you are on the latest version of the CLI.
npm view ionic@latest version
Ionic CLI is not running. shows Cannot find module 'sax'
Was expecting to run my project in web using ionic serve.
Steps to reproduce:
insert any relevant code between the above and below backticks
ionic serve
Post the output of ionic info below please
Caught exception:
Error: Cannot find module 'sax'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.
at Object.
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
Could you provide me with the output from ionic info from within your project directory? Thanks, this should help in troubleshooting.
@jthoms1 I am having the same problem on step 2 of a fresh ionic install.
Step 1: npm install -g ionic cordova
Step 2: ionic start cutePuppyPics --v2
Here is the error with ionic info:
c:DevelopmentSandboxProto>ionic info
Caught exception:
Error: Cannot find module 'sax'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.
at Object.
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
@navaidabidi
npm uninstall -g cordova ionic
then
npm install -g cordova ionic
fixed this same error for me
@CraigHarley Your solution solved my problem too.
Thank you!
@CraigHarley for my too, thank you 馃
This issue has been automatically closed because it had the v2 label. Please install the new CLI v3 (npm install -g ionic@latest). See CHANGELOG.md#Upgrading from CLI v2 for details.
If this issue is still a problem in CLI v3, please create a new issue. Thank you!
i tried it but not working for me
Most helpful comment
@navaidabidi
npm uninstall -g cordova ionicthen
npm install -g cordova ionicfixed this same error for me