2

How can I configure MSYS2 to resolve Windows-ish paths as if they were MSYS-ish paths? For example one of dependency of my application fails to find a file at:

Error: Cannot find module 'C:\Users\cca\Desktop\node-occ-sample\node_modules\webpack\bin\webpack.js;'

The application should look for the file /c/Users/cca/Desktop/node-occ-sample/... of course, but that's out of my hands. How can I make MSYS2 to resolve that kind of paths too?

ceremcem
  • 575
  • 8
  • 22
  • mingw can do that. I don't think msys2 can. I've always had to check and recheck the number of slashes used due to escaping in msys2. – Andrew Domaszek Aug 14 '20 at 14:23
  • I tried MinGW without success. Escaped backslashes (double backslashes) work on both MSYS and MinGW. However single backslash doesn't work on both. Is there a test case you can provide to see the difference between MSYS2 and MinGW? – ceremcem Aug 14 '20 at 15:01
  • I'm not entirely sure, but might be that MSYS and MinGW are based on ww.cygwin.com - if correct, there might be a `cygpath` utility available in either of them. `man cygpath` - possibly. – Hannu Aug 14 '20 at 15:10
  • What command is giving you the module missing error? – iskyfire Aug 14 '20 at 22:18
  • @iskyfire The command that gives the error is `mocha`, in [this](https://github.com/ceremcem/node-occ/tree/fix-windows-support) repo, while following "On Windows" section, inside `make test` target after `./build.sh` step. – ceremcem Aug 15 '20 at 02:53
  • I attempted to follow the instructions at https://github.com/ceremcem/node-occ/blob/fix-windows-support/README.md but I ran into several issues on Windows (including PATH integration problems). It may be worth taking a look (and adding) the steps from the base repository here: https://github.com/OpenWebCAD/node-occ/wiki/Build-on-Windows They are using VisualStudio64 instead of MSYS2. – iskyfire Aug 15 '20 at 22:51
  • @iskyfire I appreciate your time and effort, thank you. I wouldn't expect that. The reason behind the MSYS2 approach is actually based on the solution for Windows support of my own framework, scada.js. As a Linux user, it's both easy to break Windows support by a feature added on Linux and a painful effort to port a shell code to Windows for the same feature. That's why I introduced MSYS2 requirement for my own project. To achieve the similar benefits, I wanted to introduce MSYS2 into play for node-occ, so my goal is compiling the code via MSYS2. – ceremcem Aug 16 '20 at 02:20

0 Answers0