Closed chandru9279 closed 9 years ago
Thanks for making a ticket. This isn't an issue I've come across before (I used to work on a Windows machine a lot) so it's pretty unexpected. I'll take a look at a fix.
In the bundled file, in windows, this snippet is injected:
require("c:\Work\Repos\__get__");
because dirname gives back a string that has one backslash to separate path segments. You can verify this by doing a `console.log(dirname)` in windows Node thinks they are escape sequences. If we inject this
require("c:\\Work\\Repos\\__get__");
or this
require("c:/Work/Repos/__get__");
Then it works as expected
I just realised I did this in too much of a hurry and probably isn't solving your problem. I don't have access to a Windows machine or VM at this time but I'll make sure I test when I do.
Yep. the path.join
undo-es your replace. It converts back to OS Native path seperator.
I have a Windows VM, this will be fixed!
path.join
returns single backslash, if you are interpolating into a string, then they become escape sequence in windows.I was getting error like :
ERROR [framework.browserify]: Error: Cannot find module 'c:WorkReposSample-ProjectBuildScriptsGulp
Use something like https://www.npmjs.org/package/slash to normalize this on all OS.
I added a replace clause as temporary workaround for me.
path.join((__dirname), "__get__").replace(/\\/g, "/")