Skip to content

fix: publish sophie_assistant.js (fixes #197) - #198

Closed
shivasymbl wants to merge 1 commit into
brightdata:mainfrom
shivasymbl:fix/package-files
Closed

shivasymbl wants to merge 1 commit into
brightdata:mainfrom
shivasymbl:fix/package-files

Conversation

@shivasymbl

Copy link
Copy Markdown

server.js imports ./sophie_assistant.js, but package.json files doesn't list it. So @brightdata/mcp@4.0.0 from npm crashes on startup:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '.../node_modules/@brightdata/mcp/sophie_assistant.js' imported from .../server.js

Repro: npm i -g @brightdata/mcp@4.0.0 && API_TOKEN=x node "$(npm root -g)/@brightdata/mcp/server.js"

Change

  • Add sophie_assistant.js to files.
  • Add test/package-files.test.js. It fails if any published .js file imports a local module that isn't published, which catches this class of bug for the next new module.

Tests

  • New test fails before the fix (server.js imports ./sophie_assistant.js, not in package.json files) and passes after it.
  • npm test: 121/121 pass.
  • npm pack --dry-run now includes sophie_assistant.js.

Fixes #197

🤖 Generated with Claude Code

server.js imports ./sophie_assistant.js, but package.json "files" does
not list it, so the 4.0.0 npm package fails at startup with
ERR_MODULE_NOT_FOUND. Add it, plus a test that every local module a
published file imports is itself published.

Fixes brightdata#197

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@romanv-brd

Copy link
Copy Markdown
Collaborator

Thank you Shiv, this has been patched in the latest release.

@romanv-brd romanv-brd closed this Oct 28, 2026
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.

4.0.0 crashes: server.js imports sophie_assistant.js, which is not in the published package

2 participants