esy-issues icon indicating copy to clipboard operation
esy-issues copied to clipboard

chmod in buildEjectCommand is failing on windows

Open giraud opened this issue 8 years ago • 4 comments

When I run ./node_modules/esy/.bin/esy.js build-eject in windows (msys), I got the following error:

ejecting: _esy\sandbox.sb.in
ejecting: _esy\bin\render-env
fs.js:1154
  return binding.chmod(pathModule._makeLong(path), modeNum(mode));
                 ^

TypeError: mode must be an integer
    at TypeError (native)
    at Object.fs.chmodSync (fs.js:1154:18)
    at emitFile (C:\MinGW\msys\1.0\home\giraud\esy-ocaml-project\node_modules\esy\lib\esyBuildEjectCommand.js:50:10)
    at buildEjectCommand (C:\MinGW\msys\1.0\home\giraud\esy-ocaml-project\node_modules\esy\lib\esyBuildEjectCommand.js:324:3)
    at build-eject (C:\MinGW\msys\1.0\home\giraud\esy-ocaml-project\node_modules\esy\.bin\esy.js:145:5)
    at Object.<anonymous> (C:\MinGW\msys\1.0\home\giraud\esy-ocaml-project\node_modules\esy\.bin\esy.js:166:5)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)

the fs.constants.S_IRWXU is undefined on my host.

giraud avatar Jan 24 '17 11:01 giraud

Are you using msys or msys2?

jordwalke avatar Jan 25 '17 07:01 jordwalke

This might have nothing to do with msys and it could be more related to node on windows: It seems like some values will work and others won't.

https://github.com/nodejs/node-v0.x-archive/issues/4812

jordwalke avatar Jan 25 '17 07:01 jordwalke

I used msys. But after your comment I tested it again with msys2 and I got the same result

giraud avatar Jan 26 '17 21:01 giraud

Interestingly, I saw this error in non-windows builds (Node v 6.1 or earlier). Curious which version of node you used.

jordwalke avatar Feb 26 '17 08:02 jordwalke