fix: bundle typescript into nadle-lsp server#505
Merged
Conversation
Add typescript to noExternal in tsup config so it gets bundled into server.js instead of being left as an external import. Without this, the VS Code extension fails with ERR_MODULE_NOT_FOUND because typescript is not available in the extension install directory. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✅ Deploy Preview for nadle ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
size-limit report 📦
|
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
typescripttonoExternalin nadle-lsp's tsup config so it gets bundled intoserver.jsERR_MODULE_NOT_FOUND: Cannot find package 'typescript'because the installed extension directory has nonode_modules/typescriptRoot cause
tsup externalizes
typescriptby default since it's not innoExternal. The bundledserver.jsemits a bareimport ts from "typescript"that works in the monorepo (where typescript is hoisted) but fails in the VS Code extension install directory.Test plan
pnpm -F @nadle/internal-nadle-lsp buildsucceedsserver.jsno longer containsfrom "typescript"(it's inlined in a chunk)ERR_MODULE_NOT_FOUND🤖 Generated with Claude Code