question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is `nexe` support `yarn workspace` (monorepo)?

See original GitHub issue

Is 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:closed
  • Created 4 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
fmatzycommented, Dec 22, 2019

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 is true. resolve-dependencies need to set it false explicitly or to provide similar option, for supporting symlinks.

1reaction
sgollcommented, Nov 17, 2019

I just stumbled upon this unexpected behavior. I think @zhengxiaoyao0716 is correct: nexe seems to pick the wrong path when discovering a symlink inside node_modules/.

For what it’s worth, my current workaround is to manually include the required module files via the --resource flag:

--resource ".../node_modules/related-package/package.json"
--resource ".../node_modules/related-package/dist/**/*"

(Your paths may vary.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Converting Our NextJS Project to a Monorepo With Yarn ...
Before we do though, let's convert our project into a monorepo using yarn workspaces. To utilize workspaces, let's upgrade yarn: yarn set version...
Read more >
rushstack/rushstack - Gitter
Rush's support for PNPM predates the shared workspace feature. ... I'm trying to get pkg or nexe to run on my pnpm monorepo,...
Read more >
Add Nx to a Lerna & Yarn workspaces monorepo - YouTube
Learn how to add Nx to any existing monorepo. In this example, Juri Strumpflohner (@juristr) walks you through adding Nx to a Lerna...
Read more >
Newest 'yarnpkg' Questions - Stack Overflow
There are some CLI flags supported such as --url, so I can run yarn outdated --url and all outdated packages will be listed...
Read more >
Benchmarking and profiling - JS/TS Tooling Overview
Create React App (GitHub). The most popular React project initializer; supports TypeScript and many other tools, and is a safe choice for starting...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found