Vishesh Mahale
Vishesh Mahale

Reputation: 51

Not able to Publish the ASP.Net app in Visual studio

I am trying to publish the app from Visual-Studio but I am getting the error:

The command "node node_modules/webpack/bin/webpack.js --env.prod" exited with code 1. first azure app C:...\firstazureapp C:...firstazureapp\firstazureapp.csproj 497

I have followed this Article Getting Started With Angular 5 And ASP.NET Core

Everything is working fine but at publish time only I am getting the error.

I have run this command In the node modules folder and it is giving these issue

C:\Users\acer\source\repos\testfromcmd>node node_modules/webpack/bin/webpack.js --env.prod

Hash: 40bd2f76867df4f7cc31ffb9aab17185511f568b

Version: webpack 2.5.1

Child Hash: 40bd2f76867df4f7cc31 Time: 26026ms Asset Size Chunks Chunk Names main-client.js 1.73 MB 0 [emitted] [big] main-client

ERROR in main-client.js from UglifyJs

TypeError: Cannot read property 'reset' of undefined at filterdFiles.forEach (C:\Users\acer\source\repos\testfromcmd\node_modules\webpack\lib\optimize\UglifyJsPlugin.js:81:21) at Array.forEach () at Compilation.compilation.plugin (C:\Users\acer\source\repos\testfromcmd\node_modules\webpack\lib\optimize\UglifyJsPlugin.js:40:18) at Compilation.applyPluginsAsyncSeries (C:\Users\acer\source\repos\testfromcmd\node_modules\tapable\lib\Tapable.js:142:13) at self.applyPluginsAsync.err (C:\Users\acer\source\repos\testfromcmd\node_modules\webpack\lib\Compilation.js:635:10) at Compilation.applyPluginsAsyncSeries (C:\Users\acer\source\repos\testfromcmd\node_modules\tapable\lib\Tapable.js:131:46) at sealPart2 (C:\Users\acer\source\repos\testfromcmd\node_modules\webpack\lib\Compilation.js:631:9) at Compilation.applyPluginsAsyncSeries (C:\Users\acer\source\repos\testfromcmd\node_modules\tapable\lib\Tapable.js:131:46) at Compilation.seal (C:\Users\acer\source\repos\testfromcmd\node_modules\webpack\lib\Compilation.js:579:8) at C:\Users\acer\source\repos\testfromcmd\node_modules\webpack\lib\Compiler.js:493:16 at C:\Users\acer\source\repos\testfromcmd\node_modules\tapable\lib\Tapable.js:225:11 at _addModuleChain (C:\Users\acer\source\repos\testfromcmd\node_modules\webpack\lib\Compilation.js:481:11) at processModuleDependencies.err (C:\Users\acer\source\repos\testfromcmd\node_modules\webpack\lib\Compilation.js:452:13) at process._tickCallback (internal/process/next_tick.js:150:11) Child Hash: ffb9aab17185511f568b Time: 26026ms Asset Size Chunks Chunk Names main-server.js 2.04 MB 0 [emitted] [big] main-server

Upvotes: 1

Views: 208

Answers (1)

Vishesh Mahale
Vishesh Mahale

Reputation: 51

I solved my problem by changing the uglify version from 3.0.23 to 2.8.23 and this works for me thanks for help

Upvotes: 1

Related Questions