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


#1

When i create ionic app “ionic start myapp sidemenu --v2” it will shows an error like this “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”.

My system information:

    Cordova CLI: 6.5.0 
    Ionic CLI Version: 3.0.0-beta7
    ios-deploy version: Not installed
    ios-sim version: Not installed
    OS: Linux 4.2
    Node Version: v7.9.0
    Xcode version: Not installed

#2

You are using a beta version of the CLI. Beta versions often contain bugs and errors and are meant for testing as they are not production ready.


#3

A post was split to a new topic: Error Initializing app: There was an error with the spawned command: npminstall :frowning:


#4

How to install normal version of the CLI


#5

npm install -g ionic


#6

i installed ionic but when i run the command ‘ionic start myapp sidemenu --v2’ it shows the error again.

Error:
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


#7

Show me your current ionic info output now, please.


#8

In this other thread about this error the last useful idea was this:

So to repeat here:

  • Are you running this on a hard disk with maybe no more space left?
  • Any special virus scan software or anything that could block stuff?
  • Are you in China or somewhere where some servers are blocked/cencored?

An idea what you could try as an alternative:

If this doesn’t work, try it the manual way:


#9
  • Also did you run with sudo in front of it just to try?
  • Is there a npm-debug.log file in your folder somewhere?
  • Alternatively to manually downloading the zip files you could also run ionic start myapp sidemenu --v2 --skip-npm and if this succeeds run npm install in the created project directory.
  • If npm install STILL doesn’t work, try npm install --verbose and tell us the output.

Please report back if and what you tried - and if it worked.


#10


#11

output:

npm verb node v7.9.0
npm verb npm  v4.5.0
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! node-sass@4.5.0 install: `node scripts/install.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the node-sass@4.5.0 install script 'node scripts/install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm verb exit [ 1, true ]

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2017-04-23T17_51_39_566Z-debug.log

#12

Don’t ever run npm as root. Don’t ever use sudo with npm.

  • It is a needless security risk
  • You have no idea how to clean up if problems happen
  • You don’t know what is being installed where

Use nvm. If you are on windows, use nvm-windows. If you get mysterious build errors, and you have ever run npm with administrator privileges, you are completely screwed and nobody else can possibly help you until you format your hard disk, reinstall your operating system from scratch, install a proper node version manager, and reinstall everything.

OK, that last sentence is a bit of hyperbole, but not by much.


#13

I once had to go back to a system restore point. Well, 'had to" given my total lack of understanding of npm, I could probably save myself if it happened today. But I think a lot of people assume that using NodeJS is like using Eclipse, and there are so many more ways you can hurt yourself.


#14

Running eclipse as root is just as silly. Nobody does that, do they?


#15

I don’t. But I have. I’ve even taught classes where my students did that. Sloppy of me, but there’s a limit to how many details you can get somebody to follow. I think the stakes are higher here, because the framework is more fragile than the Java/Eclipse ecosystem.


#16

IMHO, anybody that would run npm or Eclipse as root should not have root access in the first place. I guess this is “get off my lawn” territory, but when you learn UNIX on actual multiuser systems you get a lot more respect and fear for the power of superuser activity.


#17

Error while running the command npm install --verbose

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! node-sass@4.5.0 install: `node scripts/install.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the node-sass@4.5.0 install script 'node scripts/install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm verb exit [ 1, true ]

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2017-05-05T03_51_08_321Z-debug.log