Ionic-cli: npminstall

Created on 1 Oct 2016  Â·  21Comments  Â·  Source: ionic-team/ionic-cli

Why I can not create a new project?
Since yesterday it's running like this!

C:WINDOWSsystem32>cd C:UsersJacobvDocumentsJavaScriptProjectsIonicProjects

C:UsersJacobvDocumentsJavaScriptProjectsIonicProjects>ionic start MyIonic2Projevt tutorial --v2
Creating Ionic app in folder C:UsersJacobvDocumentsJavaScriptProjectsIonicProjectsMyIonic2Projevt based on tutorial project
Downloading: https://github.com/driftyco/ionic2-app-base/archive/master.zip
[=============================] 100% 0.0s
Downloading: https://github.com/driftyco/ionic2-starter-tutorial/archive/master.zip
[=============================] 100% 0.0s
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

Mind letting us know? https://github.com/driftyco/ionic-cli/issues

bug

Most helpful comment

Thanks @amity203 for providing this.

This is my typical quick fix if something breaks during ionic start. Another thing to try is use the --verbose flag (ionic start --v2 --verbose MyApp) on start and it will provide more details about why the npm failed.

I will set this as a bug because we should always be reporting whey NPM failed rather than just spitting out an _Caught Exception: undefined_.

Thanks!

All 21 comments

Me also having the same issue.
Win-10 OS

yeah I got this too.
same Win-10 OS

Same issue

What do you say about it?
@jthoms1

Hi, here are the info...

Your system information:

Cordova CLI: 6.3.1
Ionic CLI Version: 2.0.0
Ionic App Lib Version: 2.0.0-beta.20
OS: Windows-10
Node Version: v4.4.7

Me help!
Best regards

After this error, run npm install , if get some error related to git , than follow below steps, it resolved for me:
Go to https://git-for-windows.github.io/ and install git
than open git cmd
run below command:
git config --global url."https://".insteadOf git://

This resolved issues for me

@amity203

what is the version of the following
node ?
npm ?
ionic ?
cordova ?

and can you provide your ionic info?

@carlotumala
Gulp version: CLI version 3.9.1
Cordova CLI: 6.3.1
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v6.2.2
NPM: 3.10.5
Xcode version: Xcode 7.3.1 Build version 7D1014

Also, i have did same fix in windows 8 system with node 4.7 and npm 3.X

where should i run the npm install? outside of my project or inside of it?

inside of the project

I still get this error, and I think windows 10 have issue with this.

and this is my info
Your system information:

Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.1
Gulp local:
Ionic CLI Version: 2.1.0-beta.3
Ionic App Lib Version: 2.0.0-beta.20
OS:
Node Version: v5.11.0

@amity203
All ok friend, i got it, thank you for your help!
I managed to install the modules and create one new the project .

@JacobbV How to solve? help。thanks

I installed git on win-10, after that npm install works fine.
Rgds

On Mon, Oct 3, 2016 at 12:37 PM, 3133 [email protected] wrote:

@JacobbV https://github.com/JacobbV How to solve? help。thanks

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/driftyco/ionic-cli/issues/1445#issuecomment-251040345,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AD0wXf_e0XcnWQLFMecTqH2ZvsaJkCbAks5qwKnHgaJpZM4KLmsH
.

@raju1979 ok? My question how to solve? help?

@amity203 It works!

Thanks @amity203 for providing this.

This is my typical quick fix if something breaks during ionic start. Another thing to try is use the --verbose flag (ionic start --v2 --verbose MyApp) on start and it will provide more details about why the npm failed.

I will set this as a bug because we should always be reporting whey NPM failed rather than just spitting out an _Caught Exception: undefined_.

Thanks!

@raju1979

Friend, tries to create a new one now, it seems that everything is ok with the ionic because these days were updating the tool there, was unstable that is why so many mistakes.
I saw there at their site a post of the new release.

@JacobbV @jthoms1 @geonho0201 I am glad that my workaround was helpful. They also fixed the memory issue, you just need to rerun npm install to get the updates

@amity203 It works clearly but makes another issue for me. Directory structure is changed. Can I rebuild that structure?

before { app, hooks, node_modules, plugins, resources, typings, www }

after { .tmp, hooks, node_modules, plugins, resources, src, www }

@geonho0201 Solution and problem both related to new structure: { .tmp, hooks, node_modules, plugins, resources, src, www }, if you go through RC release documents, then this is new structure going forward. There are other changes as well thats needs to be done as part of RC, checkout RC documents for that. If you are not using RC, than old structure but to use RC you need to have new structure.

We recently released a new version of the CLI that should allow us to gather more insight into NPM issues. Could you please update your CLI to at least 2.1.4?

npm install -g ionic@latest

Thank you!

Was this page helpful?
0 / 5 - 0 ratings