Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CLI build issue #578

Merged
merged 3 commits into from
Feb 21, 2025
Merged

Fix CLI build issue #578

merged 3 commits into from
Feb 21, 2025

Conversation

jakubno
Copy link
Member

@jakubno jakubno commented Feb 11, 2025

Load update notifier dynamically

We needed update the package because of vulnerabilities

If we don't load it asynchronously there's following error.

packages/cli generate-ref: /home/runner/work/E2B/E2B/packages/cli/dist/index.js:55406
packages/cli generate-ref: var updateNotifier = __toESM(require("update-notifier"));
packages/cli generate-ref:                              ^
packages/cli generate-ref: Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/E2B/E2B/node_modules/.pnpm/[email protected]/node_modules/update-notifier/index.js from /home/runner/work/E2B/E2B/packages/cli/dist/index.js not supported.
packages/cli generate-ref: Instead change the require of /home/runner/work/E2B/E2B/node_modules/.pnpm/[email protected]/node

@jakubno jakubno added the bug Something isn't working label Feb 11, 2025
@jakubno jakubno self-assigned this Feb 11, 2025
Copy link

changeset-bot bot commented Feb 11, 2025

🦋 Changeset detected

Latest commit: aa7a2bf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@e2b/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

Are we sure this async loading works?
Also it might be possible to tweak https://github.com/e2b-dev/E2B/blob/main/packages/cli/tsup.config.js#L5 which was previously necessary for the update-notifier packaging to fix this without changing the actual code.

@ValentaTomas ValentaTomas merged commit 4bc7129 into main Feb 21, 2025
1 of 2 checks passed
@ValentaTomas ValentaTomas deleted the fix-cli-build-issue branch February 21, 2025 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants