Is `nexe` support `yarn workspace` (monorepo)?
See original GitHub issueIs this a BUG or a FEATURE REQUEST?:
FEATURE REQUEST
What happened:
I’m now building an monorepo project follow this guide: yarn workspace
.
I packed the a package of the project used nexe
, it succeed and I got an binary-executable file like xxx.exe
. That looks good, the xxx.exe
works well, until I tried to send it to others.
It seems that the local-linked dependence were missing in the packed executable file, so if I move the xxx.exe
out of the workspace folder, then it could not launched, just throw an error like Cannot find module '${my custom package}'
.
What you expected to happen: Is it support monorepo? What should I do?
How to reproduce it (as minimally and precisely as possible):
Build an monorepo project using yarn workspace
, and for one of the package of the project, linked a custom local dependence, then packed the package used nexe
.
Anything else we need to know?: yarn --version
1.13.0
Environment
- Platform(OS/Version): Microsoft Windows [版本 10.0.15063]
- Host Node Version: v8.11.3
- Target Node Version:
- Nexe version: ^3.2.1
- Python Version: Python 3.6.1
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (3 by maintainers)
I also encountered the same issue on my monorepo project which uses lerna.
enhanced-resolve seems to provide
symlinks
option, which determines whether or not to resolve symlinks to its linked path, and default value istrue
. resolve-dependencies need to set itfalse
explicitly or to provide similar option, for supporting symlinks.I just stumbled upon this unexpected behavior. I think @zhengxiaoyao0716 is correct:
nexe
seems to pick the wrong path when discovering a symlink insidenode_modules/
.For what it’s worth, my current workaround is to manually include the required module files via the
--resource
flag:(Your paths may vary.)