1

I want to create project in asp.net core 2.0 with react.js. I have Visual Studio Community 2017 (2) version 15.9.17 with Microsoft .net framework v4.8.03761. When I create project, using .Net Core > Asp.NET Core Web Application & select Asp.Net Core 2.0 as targeted version with React.js as showing in link https://www.screencast.com/t/SRVV7vOmkz when I build project this error is showing

Error MSB3073 The command "node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js" exited with code 1.

1 Answer 1

1

I could get a similar error info if I build a new project without running npm i when using React +ASP.NET Core 2.0.

If that's the case, please make sure

  1. you have installed the node.js
  2. run cmd/powershell (might require RunAs Administrator )
  3. and cd into the project folder (the folder that contains the *.csproj)
  4. run npm i to install the dependencies (make sure there's no error info when you run npm i. If you cannot make it, try npm i --force):
> cd /path/to/the/folder/that/contains/the/*.proj/file
> npm i              

Finally, it should work fine now.


As a side note, ASP.NET Core 2.0 has reached its EOL. Please consider updating it to 2.1 (LTS).

Sign up to request clarification or add additional context in comments.

2 Comments

Is there need anything like webpack or node module to install manually?
@WaleedIrshad 1. For ASP.NET Core 2.0, you have to unless you change the *.csproj. If you don't like it, please add a task so that it runs npm i automatically. 2. Or update to higher version like ASP.NET Core 3.0. ASP.NET Core 3.0 configures a task that executes npm install for you automatically.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.