TwoWeeksReady icon indicating copy to clipboard operation
TwoWeeksReady copied to clipboard

NPM script dev:napi does not run in devcontainer from the command line

Open davidwesst opened this issue 3 years ago • 0 comments

With a fresh container, functions application doesn't work from 2wr-app NPM script dev:napi throws the exception (see below), likely due to the path not being Linux compatible.

Potential Solution: Setup a node script file that runs in the node environment so that it doesn't matter if the NPM script is being run on Windows or Linux.

Unhandled exception. System.AggregateException: One or more errors occurred. ("/workspaces/TwoWeekReady/2wr-app/..apiTwoWeeksReady\" doesn't exist.)
 ---> Azure.Functions.Cli.Common.CliException: "/workspaces/TwoWeekReady/2wr-app/..apiTwoWeeksReady\" doesn't exist.
   at Azure.Functions.Cli.ConsoleApp.UpdateCurrentDirectory(String[] args) in D:\a\1\s\src\Azure.Functions.Cli\ConsoleApp.cs:line 409
   at Azure.Functions.Cli.ConsoleApp..ctor(String[] args, Assembly assembly, IContainer container) in D:\a\1\s\src\Azure.Functions.Cli\ConsoleApp.cs:line 203
   at Azure.Functions.Cli.ConsoleApp.RunAsync[T](String[] args, IContainer container) in D:\a\1\s\src\Azure.Functions.Cli\ConsoleApp.cs:line 49
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at Azure.Functions.Cli.ConsoleApp.Run[T](String[] args, IContainer container) in D:\a\1\s\src\Azure.Functions.Cli\ConsoleApp.cs:line 36
   at Azure.Functions.Cli.Program.Main(String[] args) in D:\a\1\s\src\Azure.Functions.Cli\Program.cs:line 21

davidwesst avatar Mar 05 '22 17:03 davidwesst