Angular Project - "node node_modules/webpack/bin/webpack.js --env.prod" exited with code 2 #370

Closed
opened 2025-08-09 17:16:01 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @brycekmartin on 10/9/2017

I'm trying to create a WebDeploy package to handoff to my system admins for the netcore2.0 angular 4 project. but I keep getting the following error when I run the Publish command on the project in VS 2017...

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

Attached in the error log from npm-cache...
2017-10-09T14_36_28_220Z-debug.log

It is basically not looking in the correct directory for the package.json file...
This command works...
node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod

This command does not:
node node_modules/webpack/bin/webpack.js --env.prod

Any thoughts?

*Originally created by @brycekmartin on 10/9/2017* I'm trying to create a WebDeploy package to handoff to my system admins for the netcore2.0 angular 4 project. but I keep getting the following error when I run the Publish command on the project in VS 2017... > The command "node node_modules/webpack/bin/webpack.js --env.prod" exited with code 2. Attached in the error log from npm-cache... [2017-10-09T14_36_28_220Z-debug.log](https://github.com/aspnet/JavaScriptServices/files/1369189/2017-10-09T14_36_28_220Z-debug.log) It is basically not looking in the correct directory for the package.json file... This command works... `node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod` This command does not: `node node_modules/webpack/bin/webpack.js --env.prod` Any thoughts?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#370
No description provided.