Call to Node module failed - aspnet-webpack #227
Comments
No, that's not it. Everything here works with the 1.0 RTM. The only thing that even still mentions RC2 is my old blog post that I haven't got round to updating yet :)
You're probably right, but just to be sure, is there a non-empty directory called Assuming that directory is there, I wonder if you have a Finally, can you think of anything unusual about your Node installation? Is it perhaps really old, or installed in an unusual location, or you have multiple versions installed, or anything like that? Other people have reported similar issues in the past but I've never had any way of reproing any of them and would love to track down what people have in common when they see this error. |
@navaneethramamoorthy I ran into this on one of my Windows machines. I was using What worked for me was:
Then I tried the repo again and everything worked. |
Thanks, I think I will try this suggestion, I am facing the same error. @MarkPieszak |
I tried this but still to no avail @MarkPieszak |
Fortunately after much agony I found a solution. By copy pasting a copy of node.exe to my website virtual directory (global folder) I am able to get it to work. I am not sure why this is the case, I would assume that since node is in my PATH I should not have to do this. |
Glad you found a workaround. FYI I think the underlying issue was just fixed in pull request #248, so this should no longer affect anyone (assuming they get NodeServices |
In case anyone else sees this, I got the following error trying to run the published project in production mode after hard wiring the environment variable ASPNETCORE_ENVIRONMENT=Development on my dev machine.
Without ASPNETCORE_ENVIRONMENT it works fine. |
What about running in development on local IIS? Currently, I have multiple projects that need to be run in development environment but i can not set the ASPNETCORE_ENVIRONMENT to development when publishing to local IIS..... Is there a work around? |
@martinfletcher You can set env variables for IIS processes as described here: https://www.iis.net/configreference/system.applicationhost/applicationpools/add/environmentvariables |
@SteveSandersonMS Thanks, I had already done that, but still did not work. I discovered (from the source code) that http binding is required for aspnet-webpack (hard coded localhost on http). I take it this will now break if i have require https filters in place? Is there specific urls that i can exclude from this, or ideally a better way of not having to have http binding for my app? |
I am getting this error after I upgraded a project to 2.0. Everything works fine except HotModule. Here is the full error
Here is the code it errors on
npm verison
|
@isaac2004 You're running a very old version of Node. You might need to update that. If that doesn't fix it, could you figure out what are the minimal steps to reproduce the issue based on a new project? Then we can investigate. |
Upgrading Node seemed to fix the issue... |
Upgrade Node to what? I'm using node v8.1.2 and am experiencing this problem. I have set |
When I attempt to use web.config to override the global system environment setting for The only way I've found alter the environment setting is to alter the actual environment variables. |
Fixed my issue by updating the NodeJS. |
I ran into this problem when publishing on Azure because my app settings file was named: appsettingsDev.json but the ASPNETCORE_ENVIRONMENT variable in Azure (App Services/select the app/Application Settings) was set to "Development" (so it was looking for a file called "appsettingsDevelopment.json" not "appsettingsDev.json"). I changed the ASPNETCORE_ENVIRONMENT value to "Dev" and the problem went away. |
Hi All, For some reason our latest deployment to test has causes this same issue. |
HI
Generator aspnetcore-spa project and tried to run in production mode. but gives below exception.
aspnet webpack is installed properly. but still it is not loading the module. there is no change in package.json and project.json
it does not run in both production and development mode as well. is it because am using ASP.NET Core 1.0, instead of ASP.NET CORE RC2.
i want to check Server rendering feature in this project. how to achieve this?
thanks
Navaneeth
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AggregateException: One or more errors occurred. (Call to Node module failed with error: To use webpack dev middleware, you must install the 'aspnet-webpack' NPM package.) ---> System.Exception: Call to Node module failed with error: To use webpack dev middleware, you must install the 'aspnet-webpack' NPM package.
at Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance.d__7
1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult()at Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.d__12
1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult()at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.d__9
1.MoveNext() --- End of inner exception stack trace --- 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 Ng2ServerRender.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.AspNetCore.Hosting.Internal.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
at Ng2ServerRender.Program.Main(String[] args)
The text was updated successfully, but these errors were encountered: