简体   繁体   中英

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

我通过将 uglify 版本从 3.0.23 更改为 2.8.23 解决了我的问题,这对我有用,感谢帮助

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