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.
I am unable to create a working NuGet package for SpaServices locally on my Windows machine (tried dev and master branches). Following a dotnet restore, I am running the following from both NodeServices and SpaServices directories.
In my project, SpaServices will successfully upgrade from the official package to my custom version (with as yet unchanged source), however the next dotnet run fails at UseWebpackDevMiddleware() with the exception below. I've checked my cache in ~/.nuget and everything appears to be in order with the package.
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: Error: Cannot find module 'C:\Users\Matt\AppData\Local\Temp\tmp2C5.tmp'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at C:\Users\Matt\AppData\Local\Temp\tmp382.tmp:104:34
at IncomingMessage.<anonymous> (C:\Users\Matt\AppData\Local\Temp\tmp382.tmp:128:35)
at emitNone (events.js:86:13)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:973:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)) ---> System.Exception: Call to Node module failed with error: Error: Cannot find module 'C:\Users\Matt\AppData\Local\Temp\tmp2C5.tmp'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at C:\Users\Matt\AppData\Local\Temp\tmp382.tmp:104:34
at IncomingMessage.<anonymous> (C:\Users\Matt\AppData\Local\Temp\tmp382.tmp:128:35)
at emitNone (events.js:86:13)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:973:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance.<InvokeExportAsync>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 Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.<InvokeExportAsync>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 Microsoft.AspNetCore.NodeServices.NodeServicesImpl.<InvokeExportWithPossibleRetryAsync>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 Trainline.ContactCentre.Host.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env)
--- 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 Trainline.ContactCentre.Host.Program.Main(String[] args)
I'm not sure what technique you're using to get your project to reference your custom-built SpaServices package, but my guess is that something must be set up incorrectly with that.
If you want to run with a custom-modified dependency, I'd suggest this technique to make it build the dependency from source: http://stackoverflow.com/a/29260539. This way there's no need to hack around with your ~/.nuget directory. This is how the JavaScriptServices repo itself it set up so that when editing samples (etc) it loads NodeServices/SpaServices/etc directly from source and there's no need to build them manually.
If you then want to distribute your custom SpaServices package, you can of course give it some distinct name and publish to any NuGet service.
I am unable to create a working NuGet package for
SpaServices
locally on my Windows machine (tried dev and master branches). Following adotnet restore
, I am running the following from bothNodeServices
andSpaServices
directories.In my project,
SpaServices
will successfully upgrade from the official package to my custom version (with as yet unchanged source), however the nextdotnet run
fails atUseWebpackDevMiddleware()
with the exception below. I've checked my cache in ~/.nuget and everything appears to be in order with the package.From Startup.cs:
My packages.json:
The text was updated successfully, but these errors were encountered: