Prabhat Ranjan
Prabhat Ranjan

Reputation: 1

Error with Spawned command: npminstall

I am trying to run a sample application from https://ionicframework.com/getting-started/. But I am getting the error - there was an error with the spawned process: npminstall every time I try to run the application. Any help is highly appreciated.

Upvotes: 0

Views: 54

Answers (3)

Emeka Obianom
Emeka Obianom

Reputation: 1794

For me it was only to upgrade to new version of npm

npm install -g npm

Upvotes: 1

Bryan zhang
Bryan zhang

Reputation: 1

install npm globally

npm install -g npm 

create a app without installing its packages

ionic start app --v2 --skip-npm

seems ok till now?then

cd app

install packages

npm install --save

done!try to start your ionic app

ionic serve

Upvotes: 0

Prabhat Ranjan
Prabhat Ranjan

Reputation: 1

Spawned command error comes when you try to start a new ionic or cordova app, that gets downloaded from git. This error occurs because your network proxy blocks download a new blank app from git.

To avoid such kind of error try removing the proxies. 1. If you are in a company using their proxy its not possible to do that, so use your own data to do that.

  1. Try downloading a blank app from git using your own data, don't use company network which has proxy enabled. It will download but while installing the app you will get error like: Error with start undefined. Error with spawned command npminstall. Don't worry a folder will be downloded,

Go to cmd and go inside that app directory and run ionic serve It will give error like ionic.config.json file didn't find. create a file with the name ionic.config.json inside the app file. inside that file paste the following: { "name": "your app name", "app_id": "", "v2": true, "typescript": true }

now try running the command ionic serve your app will run. I had the similar problem but it worked for me.

Upvotes: 0

Related Questions