Hello, I've just tried to "npm run watch" a sample project in Ubuntu successfully.
However, I had no luck in Windows. I'm receiving this error:
'vendor\bin\jigsaw' is not recognized as an internal or external command
Has anyone try to run jigsaw with browsersync on windows?
Thanks in advance
@pablood85 What terminal are you using? Command Prompt?
@jasonlbeggs I tried with Command Prompt and Git Bash.
Interesting. On my Windows machine, git bash works perfectly. For it to work in command prompt, I had to change the path to php vendor\bin\jigsaw.
I can execute the php jigsaw command manually without any problem.
But for some reason webpack can't.
I suspect that this line is the problem (in bin,js):
if (fs.existsSync('./vendor/bin/jigsaw')) {
return path.normalize('./vendor/bin/jigsaw')
}
Yes. If you replace that second line with return php vendor\\bin\\jigsaw, it will probably work.
Hi Pablo, I鈥檓 using Jigsaw with Git Bash on Windows and never had this issue.
Can you first add a console.log before that return, to check what path.normalize() outputs exactly?
Also, if the output is correct and you can manually run that (i.e. [output logged] build), can you confirm that the executable exists at that location in your vendor directory?
I deleted the vendor folder, updated composer and installed the dependencies again.
Now it's working.
Thanks a lot @hellocosmin @jasonlbeggs
Yes, thanks @hellocosmin and @jasonlbeggs!
Most helpful comment
I deleted the vendor folder, updated composer and installed the dependencies again.
Now it's working.
Thanks a lot @hellocosmin @jasonlbeggs