Skip to content

Conversation

@chupe
Copy link
Contributor

@chupe chupe commented Jan 13, 2026

Problem

The VS Code extension fails to activate with error:

Cannot find module 'vscode-languageclient/node'

The --no-dependencies flag in vsce package assumes dependencies are bundled into the output JS, but the build uses plain tsc which only transpiles without bundling.

Solution

  • Replace tsc with esbuild for bundling all dependencies into a single minified file
  • Add typecheck script to retain TypeScript type checking
  • Move @types/* packages to devDependencies where they belong
  • Add node_modules/ and **/*.map to .vscodeignore to keep package small

Result

  • Extension now activates correctly
  • Package size: 129 KB (vs 1.15 MB if bundling node_modules directly without esbuild)

Testing

  1. Built and packaged extension with bun run package
  2. Installed .vsix in VS Code
  3. Verified extension activates and "Codebook" appears in Output panel
  4. Confirmed spell checking works on supported file types

…tion

The VS Code extension fails to activate with:
  Cannot find module 'vscode-languageclient/node'

The --no-dependencies flag in vsce package assumes dependencies are bundled
into the output JS, but the build uses plain tsc which only transpiles.

Changes:
- Replace tsc with esbuild for bundling dependencies into single minified file
- Add typecheck script to retain TypeScript type checking
- Move @types/* packages to devDependencies
- Add node_modules/ and **/*.map to .vscodeignore

Result: Extension activates correctly, package size 129 KB
@chupe
Copy link
Contributor Author

chupe commented Jan 13, 2026

Hey folks, hope you don't mind the PR.

Thank you for your work, I really appreciate the convenience of using codebook across my editors.
I was having some issue trying to get it to work in VSCode. After root-causing it to a missing dependency after the build is completed I created the PR using Opencode/Claude.

Look forward to your feedback!

@blopker
Copy link
Owner

blopker commented Jan 13, 2026

Very cool! I haven't used VSCode in a bit now, so progress on this has been slow. Thank you for checking it out. PR looks good. Please let me know if you run into any further issues!

@blopker blopker merged commit e3bca45 into blopker:main Jan 13, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants