Skip to content

chore(build): build a universal ESM and CommonJS package #1229

chore(build): build a universal ESM and CommonJS package

chore(build): build a universal ESM and CommonJS package #1229

Triggered via pull request July 15, 2025 14:47
Status Failure
Total duration 6m 13s
Artifacts 4

code_health.yaml

on: pull_request
Matrix: Run MongoDB tests
Run Atlas tests
2m 15s
Run Atlas tests
Report Coverage
52s
Report Coverage
Fit to window
Zoom out
Zoom in

Annotations

11 errors, 18 warnings, and 2 notices
Run MongoDB tests (macos-latest)
Process completed with exit code 1.
tests/integration/build.test.ts > Build Test > should have matching exports between CommonJS and ESM modules: tests/integration/build.test.ts#L23
Error: Cannot find module '../../dist/esm/lib.js' imported from '/Users/runner/work/mongodb-mcp-server/mongodb-mcp-server/tests/integration/build.test.ts' ❯ tests/integration/build.test.ts:23:28 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'ERR_MODULE_NOT_FOUND' } Caused by: Error: Failed to load url ../../dist/esm/lib.js (resolved id: ../../dist/esm/lib.js) in /Users/runner/work/mongodb-mcp-server/mongodb-mcp-server/tests/integration/build.test.ts. Does the file exist? ❯ loadAndTransform node_modules/vite/dist/node/chunks/dep-DZ2tZksn.js:26412:33
tests/integration/build.test.ts > Build Test > should successfully import ESM module: tests/integration/build.test.ts#L23
Error: Cannot find module '../../dist/esm/lib.js' imported from '/Users/runner/work/mongodb-mcp-server/mongodb-mcp-server/tests/integration/build.test.ts' ❯ tests/integration/build.test.ts:23:28 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'ERR_MODULE_NOT_FOUND' } Caused by: Caused by: Error: Failed to load url ../../dist/esm/lib.js (resolved id: ../../dist/esm/lib.js) in /Users/runner/work/mongodb-mcp-server/mongodb-mcp-server/tests/integration/build.test.ts. Does the file exist? ❯ loadAndTransform node_modules/vite/dist/node/chunks/dep-DZ2tZksn.js:26412:33
Run MongoDB tests (ubuntu-latest)
Process completed with exit code 1.
tests/integration/build.test.ts > Build Test > should have matching exports between CommonJS and ESM modules: tests/integration/build.test.ts#L23
Error: Cannot find module '../../dist/esm/lib.js' imported from '/home/runner/work/mongodb-mcp-server/mongodb-mcp-server/tests/integration/build.test.ts' ❯ tests/integration/build.test.ts:23:28 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'ERR_MODULE_NOT_FOUND' } Caused by: Error: Failed to load url ../../dist/esm/lib.js (resolved id: ../../dist/esm/lib.js) in /home/runner/work/mongodb-mcp-server/mongodb-mcp-server/tests/integration/build.test.ts. Does the file exist? ❯ loadAndTransform node_modules/vite/dist/node/chunks/dep-DZ2tZksn.js:26412:33
tests/integration/build.test.ts > Build Test > should successfully import ESM module: tests/integration/build.test.ts#L23
Error: Cannot find module '../../dist/esm/lib.js' imported from '/home/runner/work/mongodb-mcp-server/mongodb-mcp-server/tests/integration/build.test.ts' ❯ tests/integration/build.test.ts:23:28 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'ERR_MODULE_NOT_FOUND' } Caused by: Caused by: Error: Failed to load url ../../dist/esm/lib.js (resolved id: ../../dist/esm/lib.js) in /home/runner/work/mongodb-mcp-server/mongodb-mcp-server/tests/integration/build.test.ts. Does the file exist? ❯ loadAndTransform node_modules/vite/dist/node/chunks/dep-DZ2tZksn.js:26412:33
Run MongoDB tests (windows-latest)
Process completed with exit code 1.
tests/integration/build.test.ts > Build Test > should have matching exports between CommonJS and ESM modules: tests/integration/build.test.ts#L33
Error: Invalid package config \\?\D:\a\mongodb-mcp-server\mongodb-mcp-server\dist\package.json. ❯ tests/integration/build.test.ts:33:27 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'ERR_INVALID_PACKAGE_CONFIG' }
tests/integration/build.test.ts > Build Test > should successfully import ESM module: tests/integration/build.test.ts#L23
Error: Cannot find module '../../dist/esm/lib.js' imported from 'D:/a/mongodb-mcp-server/mongodb-mcp-server/tests/integration/build.test.ts' ❯ tests/integration/build.test.ts:23:28 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'ERR_MODULE_NOT_FOUND' } Caused by: Caused by: Error: Failed to load url ../../dist/esm/lib.js (resolved id: ../../dist/esm/lib.js) in D:/a/mongodb-mcp-server/mongodb-mcp-server/tests/integration/build.test.ts. Does the file exist? ❯ loadAndTransform node_modules/vite/dist/node/chunks/dep-DZ2tZksn.js:26412:33
tests/integration/build.test.ts > Build Test > should successfully require CommonJS module: tests/integration/build.test.ts#L16
Error: Invalid package config \\?\D:\a\mongodb-mcp-server\mongodb-mcp-server\dist\package.json. ❯ tests/integration/build.test.ts:16:27 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'ERR_INVALID_PACKAGE_CONFIG' }
Report Coverage
Unable to download artifact(s): Artifact not found for name: test-results Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact. For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md
Run MongoDB tests (macos-latest)
No ALTQ support in kernel ALTQ related functions disabled pf enabled
Run MongoDB tests (macos-latest)
No ALTQ support in kernel ALTQ related functions disabled
Run MongoDB tests (macos-latest)
pfctl: Use of -f option, could result in flushing of rules present in the main ruleset added by the system at startup. See /etc/pf.conf for further details.
Run MongoDB tests (macos-latest)
YES (0)
Run MongoDB tests (macos-latest)
2025-07-15 14:47:51.211 sysadminctl[843:4860] Creating home directory at /Users/mitmproxyuser
Run MongoDB tests (macos-latest)
2025-07-15 14:47:51.124 sysadminctl[843:4860] Assigning UID: 502 GID: 20
Run MongoDB tests (macos-latest)
2025-07-15 14:47:50.947 sysadminctl[843:4860] Creating user record…
Run MongoDB tests (macos-latest)
IOServiceMatchingfailed for: AppleM2ScalerCSCDriver
Run MongoDB tests (macos-latest)
2025-07-15 14:47:50.429 sysadminctl[843:4860] ---------------------------- 2025-07-15 14:47:50.429 sysadminctl[843:4860] No clear text password or interactive option was specified (adduser, change/reset password will not allow user to use FDE) ! 2025-07-15 14:47:50.429 sysadminctl[843:4860] ----------------------------
Run Atlas tests
1 added, 0 removed; done.
Run Atlas tests
rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
Run Atlas tests
Updating certificates in /etc/ssl/certs...
Run Atlas tests
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Run MongoDB tests (ubuntu-latest)
No files were found with the provided path: coverage/lcov.info. No artifacts will be uploaded.
Run MongoDB tests (ubuntu-latest)
1 added, 0 removed; done.
Run MongoDB tests (ubuntu-latest)
rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
Run MongoDB tests (ubuntu-latest)
Updating certificates in /etc/ssl/certs...
Run MongoDB tests (ubuntu-latest)
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Run MongoDB tests (macos-latest)
The macos-latest label will migrate to macOS 15 beginning August 4, 2025. For more information see https://github.com/actions/runner-images/issues/12520
Run MongoDB tests (macos-latest)
The macos-latest label will migrate to macOS 15 beginning August 4, 2025. For more information see https://github.com/actions/runner-images/issues/12520

Artifacts

Produced during runtime
Name Size Digest
atlas-test-results Expired
9.63 KB
sha256:562f2457d51b187e773cd5616b9801bea5213b5bea89837668841994dac6b110
run-atlas-tests-permissions-60b027ab209dedf6863e2ec487c03f29 Expired
140 Bytes
sha256:79b7a9a1bc6a7968b5e2dc6ebc3d5288ccfd2d94a15a3a75240d75170830d3a0
run-tests-permissions-439119f3d2e8abc4bb30e9af6523fe1a Expired
140 Bytes
sha256:7a82d8d2b690f0a8dd130ff2f7c90aafd4b27e69b4355aa51f3aa6200d21aa59
run-tests-permissions-8bdf9cdc0ce9ea025bfb98c2500edeca Expired
140 Bytes
sha256:87aa479c099653d90f3707a01e173a7ed1a0c81b9c459d651b2ae93e31084b35