Ionic 3: ionic start -n … if you use spaces in the project name, npm dependencies will not install

Just a warning for those migrating to or starting to develop with Ionic 3 framework, if you create a new project with illegal characters in a package.json “name”, npm dependencies will not install.

You might encounter an error right away when performing “ionic serve” or “ionic cordova run” like:

Error: Cannot find module '@ionic/app-scripts'

The error/warning is hidden in Ionic 3 CLI with the spinner unless you specified “–verbose” with “ionic start”.

You will have to fix the name in package.json in the project folder (e.g. replace spaces with dashes) and re-“npm install”.

This didn’t happen in prior versions of Ionic as it kept the package.json “name” to something like ionic-hello-world.

*    *    *

Take a break from work and enjoy a game at GameSlush.com.

0 thoughts on “Ionic 3: ionic start -n <project name> … if you use spaces in the project name, npm dependencies will not install”

Leave a Reply

Your email address will not be published. Required fields are marked *