Call to Node module failed with error: SyntaxError: Unexpected reserved word #831

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

Originally created by @JoshLefebvre on 4/14/2017

System.AggregateException occurred
HResult=0x80131500
Message=One or more errors occurred.
Source=
StackTrace:
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Microsoft.AspNetCore.Builder.WebpackDevMiddleware.UseWebpackDevMiddleware(IApplicationBuilder appBuilder, WebpackDevMiddlewareOptions options)
at xxx.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) in C:\Users...\Startup.cs:line 69

Inner Exception 1:
Exception: Call to Node module failed with error: SyntaxError: Unexpected reserved word
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.requireNewCopy (C:\Users...\node_modules\aspnet-webpack\RequireNewCopy.js:16:16)
at createWebpackDevServer (C:\Users...\node_modules\aspnet-webpack\WebpackDevMiddleware.js:169:48)
at createWebpackDevServer (C:\Users...\AppData\Local\Temp\tmp7E29.tmp:74:50)

Trying to get hot reloading working for my solution that's using react with JSX and ES6. I keep getting the above error thrown at the following lines of code:
app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions { HotModuleReplacement = true, ReactHotModuleReplacement = true, ConfigFile = "webpack.config.babel.js" });
I have a feeling this has something to do with transpilation not occuring. Is there someway to pass in/use babel in this scenario if that is the case???

*Originally created by @JoshLefebvre on 4/14/2017* > System.AggregateException occurred HResult=0x80131500 Message=One or more errors occurred. Source=<Cannot evaluate the exception source> StackTrace: at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at Microsoft.AspNetCore.Builder.WebpackDevMiddleware.UseWebpackDevMiddleware(IApplicationBuilder appBuilder, WebpackDevMiddlewareOptions options) at xxx.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) in C:\Users\...\Startup.cs:line 69 > Inner Exception 1: Exception: Call to Node module failed with error: SyntaxError: Unexpected reserved word at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:373:25) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.requireNewCopy (C:\Users\...\node_modules\aspnet-webpack\RequireNewCopy.js:16:16) at createWebpackDevServer (C:\Users\...\node_modules\aspnet-webpack\WebpackDevMiddleware.js:169:48) at createWebpackDevServer (C:\Users\...\AppData\Local\Temp\tmp7E29.tmp:74:50) Trying to get hot reloading working for my solution that's using react with JSX and ES6. I keep getting the above error thrown at the following lines of code: `app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions { HotModuleReplacement = true, ReactHotModuleReplacement = true, ConfigFile = "webpack.config.babel.js" });` I have a feeling this has something to do with transpilation not occuring. Is there someway to pass in/use babel in this scenario if that is the case???
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#831
No description provided.