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
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
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.
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
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.
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.
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.
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.
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