You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
My Angular template is not working. (.net core) #845
Hi, I am trying to develop a web app using .net core angular 2 but I am having trouble running the app
Call to Node module failed with error: TypeError: Cannot read property 'publicPath' of undefined
at C:\Users\nadeeshag.NCS\node_modules\aspnet-webpack\WebpackDevMiddleware.js:99:59
at Array.forEach (native)
at Server.<anonymous> (C:\Users\nadeeshag.NCS\node_modules\aspnet-webpack\WebpackDevMiddleware.js:88:32)
at Server.g (events.js:286:16)
at emitNone (events.js:86:13)
at Server.emit (events.js:185:7)
at emitListeningNT (net.js:1279:10)
at _combinedTickCallback (internal/process/next_tick.js:71:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Microsoft.AspNetCore.NodeServices.HostingModels.<InvokeExportAsync>d__7.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.NodeServices.HostingModels.<InvokeExportAsync>d__13.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.NodeServices.<InvokeExportWithPossibleRetryAsync>d__10.MoveNext()
Any Idea why this issue is popping up. By the way, i am using webpack 2
Are you using the latest generator here? What changes have you made since the original? Check your git history on the webpack.config file its something there causing it potentially.
WebpackDevMiddleware tries to read publicPath from the output section of your Webpack config. If you (somehow) don't have an output section, you'd get this error. I don't think your Webpack config is likely to work without an output section anyway, so you probably should compare your config with a working one.
If you think there are scenarios where you wouldn't have an output section but this should still work, please file a separate issue with details. Thanks!
@SteveSandersonMS@MarkPieszak Thank you. Actually i found the issue. It's because I have another node modules list were installed inside my user folder. I have removed that folder and it started working.
Activity
MarkPieszak commentedon Apr 6, 2017
Are you using the latest generator here? What changes have you made since the original? Check your git history on the webpack.config file its something there causing it potentially.
SteveSandersonMS commentedon Apr 7, 2017
WebpackDevMiddlewaretries to readpublicPathfrom theoutputsection of your Webpack config. If you (somehow) don't have anoutputsection, you'd get this error. I don't think your Webpack config is likely to work without anoutputsection anyway, so you probably should compare your config with a working one.If you think there are scenarios where you wouldn't have an
outputsection but this should still work, please file a separate issue with details. Thanks!gayan1991 commentedon Apr 7, 2017
@SteveSandersonMS @MarkPieszak Thank you. Actually i found the issue. It's because I have another node modules list were installed inside my user folder. I have removed that folder and it started working.