Jigsaw: npm run watch not working on windows

Created on 7 Aug 2018  路  8Comments  路  Source: tighten/jigsaw

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

Most helpful comment

I deleted the vendor folder, updated composer and installed the dependencies again.
Now it's working.

Thanks a lot @hellocosmin @jasonlbeggs

All 8 comments

@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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

royvanv picture royvanv  路  10Comments

nathangross picture nathangross  路  3Comments

Log1x picture Log1x  路  8Comments

luklus picture luklus  路  11Comments

michielgerritsen picture michielgerritsen  路  7Comments