Installing npm packages... Error with start undefined Error Initializing app: There was an error with the spawned command: npminstall There was an error with the spawned command: npminstall Caught exception: undefined
Ionic 2 reports an error when creating a project, as shown above; I tried many methods. NPM, Cordova and ionic all tried to reinstall. But it is still invalid. There is no problem generating ionic1 project when ionic starts, but there is a problem when upgrading ionic2. I think it’s a network problem. It seems that the source of NPM is from abroad. Wait until the net is good
There is now a compromise, as follows:
Solution:
At this time, we can first use the domestic image cnpm. The installation command is:
NPM install – G cnpm
then try cnpm – V to see if there is a version number. If there is, the installation is successful
then the following statement
ionic start app — V2 — skip NPM
To explain the above statement, – V2 means to create an app with ionic2 version, – skip NPM means to skip the NPM installl package stage
so there will be no error prompt this time, but the creation is not really completed. We also need to enter the app directory and execute cnpm install — save
once. If there is no error, it means success. At this time, you can use the ionic serve command, See the effect of our app interface on the browser
Similar Posts:
- Ionic reported an error when creating a new project — it has been solved
- macos -bash: yarn: command not found/-bash: cnpm: command not found
- Solutions to the problem that image webpack loader cannot be installed or the installation is stuck
- Angular Project Download Error: [ERROR] ionic-app-scripts has unexpectedly closed (exit code 1).
- Solve the problem of “failed to load the JNI shared library” when eclipse starts
- Vue project startup error: core JS/modules/ [How to Solve]
- NPM Install gulp-sass error: checking for Python executable “python2” in the PATH
- npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: want
- [Solved] Error: Rule can only have one resource source (provided resource and test + include + exclude) in {
- Summary of 5 error reports encountered during Vue installation