Skip to content

fix: move dayjs to prod dependencies#850

Merged
chrisdp merged 1 commit into
masterfrom
fix-dayjs-prod-dependency
Jul 7, 2026
Merged

fix: move dayjs to prod dependencies#850
chrisdp merged 1 commit into
masterfrom
fix-dayjs-prod-dependency

Conversation

@TwitchBronBron

Copy link
Copy Markdown
Member

Problem

The 2.67.1 extension crashes on activation with:

Error: Cannot find module 'dayjs/plugin/relativeTime'
Require stack:
- .../dist/commands/LanguageServerInfoCommand.js
- .../dist/LanguageServerManager.js
- ...

Root cause

dayjs is imported at extension-activation runtime:

  • src/commands/LanguageServerInfoCommand.tsimport * as relativeTime from 'dayjs/plugin/relativeTime' and import * as dayjs from 'dayjs'
  • src/LanguageServerManager.tsimport * as dayjs from 'dayjs'

...but it was listed under devDependencies. During packaging (vsce package), devDependencies are stripped from the .vsix, so dayjs was absent from the installed extension and activation failed.

This works fine in dev because devDependencies are installed locally.

Fix

Move dayjs from devDependencies back into dependencies and update the lockfile.

🤖 Generated with Claude Code

dayjs is imported at extension-activation runtime in
LanguageServerInfoCommand.ts and LanguageServerManager.ts, but was
listed under devDependencies. When the extension is packaged into a
.vsix, devDependencies are stripped, so the installed build failed to
activate with "Cannot find module 'dayjs/plugin/relativeTime'".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@chrisdp
chrisdp merged commit 9afb377 into master Jul 7, 2026
8 checks passed
@chrisdp
chrisdp deleted the fix-dayjs-prod-dependency branch July 7, 2026 17:51
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