Open kriskowal opened 10 years ago
@stuk left some notes https://gist.github.com/anonymous/f9f7e996dd74c525d1b0
Hi guys, Still having issues after editing optimize.js in ...\AppData\Roaming\npm\node_modules\mop\ as per path.diff (https://gist.github.com/anonymous/f9f7e996dd74c525d1b0)
Error: Can't read /Program%20Files/.../temp-converter/package.json because ENOENT, open 'C:\Program%20Files\...\temp-converter\package.json'
The command to open seems to have the right path but for some reason at execution, the path gets transformed into a unix format which obviously can't be used to access the file in Windows.
Please advise where the path transformation occurs so that I can apply fixes such as is in path.diff (https://gist.github.com/anonymous/f9f7e996dd74c525d1b0) to the applicable file(s).
Sorry about the massive font -- not sure how/why my comment was posted as such
I was taking another look at this yesterday, and will hopefully fix it today.
(Markdown was treating the ----
s as an underline for a title, hence the giant font :). I've edited your comment to put it inside a code block)
I have a PR here for review: https://github.com/montagejs/mop/pull/50
Thanks @Stuk. Much appreciated. Will check out the PR
Turns out problem was due to space character in directory absolute path name - Program Files - mop works just fine when run from a directory with no space in its path name Thanks for the effort guys
Oh, that’s interesting, and probably reproducible elsewhere.
Just stumbled over @onezeroonezero's issue with a path containing spaces on Windows...
The issue seems to be that the path is URL encoded somewhere along the way, as can be seen in @onezeroonezero's first post: Can't read /Program%20Files/
Mop was designed to work on Windows, but it was never tested and I cut some corners, especially in Mr where paths are supposed to be consistently normalized to URL’s, and where URL’s have to be transformed back to paths for FS operations.