Closed bindea-mihai closed 1 year ago
Thanks for identifying this issue. This issue seems to be isolated to windows due to the lack of a -p
argument on mkdir
. I will look into it.
It looks like npm
by default uses cmd.exe
. One solution would be to configure npm
to use git bash using the following command.
npm config set script-shell "C:\\Program Files (x86)\\git\\bin\\bash.exe"
Let me know if that fixes it.
Worked like a charm.
One mention though, git is installed in C:\\Program Files\\git\\bin\\bash.exe
That also explains why the -p
folder was created
@karthik2804 Is the -p
really needed there? It seems to be creating only one level of directory.
@itowlson On Unix systems it let's the command run without failing if the directory already exists.
-p, --parents no error if existing, make parent directories as needed, with their file modes unaffected by any -m option
TIL! Thanks Karthik!
Can we close this issue @bindea-mihai
Docs have also been updated Re: this issue. https://github.com/fermyon/developer/pull/299 Thanks @bindea-mihai for raising this also.
Steps to reproduce
spin build
againResult: When running
spin build
for the 2nd time you get the following errorWorkaround
In order to build your app for the 2nd time, you need to manually delete the following folders:
-p
,dist
andtarget
Other info:
OS:
Windows 11 Pro, Version 10.0.22621 Build 22621
Spin:0.7.1 (6cf7447 2022-12-19)
Spin plugin:js2wasm 0.1.0