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

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.