Error MSB3073: The command "node node_modules/webpack/bin/webpack.js --env.prod" exited with code 2

11,245

You need to run this on console: node node_modules/webpack/bin/webpack.js --env.prod

then you will get the list of all the issues, and need to solve all of them, someone gonna be like:

ERROR in navmenu.component.html: Property 'auth' is protected and only accessible within class 'NavMenuComponent' and its subclasses.

another case:

ERROR in Error at estados.component.html(19,72): Expected 0 arguments, but got 1.
Error at home.component.html(8,12): Property 'selectedCharacter' does not exist on type 'HomeComponent'. Did you mean 'selectedCharacters'?

Each error have a different solution, you need to solve them all.

You can check this link: Angular – The command “node node_modules/webpack/bin/webpack.js –env.prod” exited with code 2 and similar errors: how to fix them

Share:
11,245
Bhuvanesh
Author by

Bhuvanesh

Updated on June 11, 2022

Comments

  • Bhuvanesh
    Bhuvanesh almost 2 years

    I'm building web application using asp.net core 2x and angular 5,during development/debug mode everything is getting build well.But when i try to publish it with release mode in visual studio 2017 am getting this error.please help me to resolve this.Am not using this in my code but it exists. Function calls are not supported in decorators but 'makeParamDecorator' was called in 'Injectable' 'Injectable' calls 'makeParamDecorator'.Please help.Thanks in advance.Screenshot of my error message

  • Kevin Burton
    Kevin Burton almost 6 years
    This is from the ASP.NET Core Angular template. The error that shows up is: ERROR in main-client.js from UglifyJs Unexpected token: operator (>) [main-client.js:52912,19] At least that is the only par of the output that is in red. I have no control over main-client.js as it seems to be part of the template.