简体   繁体   中英

How to fix 'The command "npm install" exited with code 1' error when building the ASP.NET Core app with React?

I am new to ReactJS. I am trying to build the default application created using ASP.NET Core and React.

选择器图像

I am getting build error.

error MSB3073: The command "npm install" exited with code 1.

Can someone help me with this?

Running Visual Studio as administrator worked for me.

在此处输入图片说明

Looks like you don't have node & npm globally installed.

You can use a script like https://github.com/creationix/nvm that helps you manage different versions of nodejs

Or you can just install it straight from https://nodejs.org/en/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM