Testcontainers is a NodeJS library that supports tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
1 | import { CouchbaseContainer, StartedCouchbaseContainer } from '@testcontainers/couchbase';
| ^
2 |
3 | let startedTestContainer;
4 |
at Resolver._throwModNotFoundError (../../../node_modules/.pnpm/jest-resolve@29.7.0/node_modules/jest-resolve/build/resolver.js:427:11)
at Object. (../../../node_modules/.pnpm/@testcontainers+couchbase@10.12.0/node_modules/@testcontainers/couchbase/src/couchbase-container.ts:10:1)
at Object. (../../../node_modules/.pnpm/@testcontainers+couchbase@10.12.0/node_modules/@testcontainers/couchbase/src/index.ts:1:1)
at Object. (src/issue.test.ts:1:1)
___
**Steps to Reproduce**
Here's a basic Jest test that will fail with the above error:
import { CouchbaseContainer } from '@testcontainers/couchbase';
describe('test connection', () => {
test('success', async () => {
// usage shown in example here: https://testcontainers.com/modules/couchbase/
const container1 = await new CouchbaseContainer().start();
});
});
Additionally, these imports are not exported in the @testcontainers/couchbase npm package:
import { BucketDefinition } from "./bucket-definition";
import { CouchbaseService } from "./couchbase-service";
Environment Information
Operating System: MacOS
Docker Version: Docker version 27.1.1, build 6312585
Expected Behaviour Able to initialize Couchbase as shown in examples
Example 2
Actual Behaviour
Cannot find module 'testcontainers/src/utils/bound-ports
Testcontainer Logs
Cannot find module 'testcontainers/src/utils/bound-ports' from '../../../node_modules/.pnpm/@testcontainers+couchbase@10.12.0/node_modules/@testcontainers/couchbase/build/couchbase-container.js'
Require stack: /Users/joeygreco/my_repo/node_modules/.pnpm/@testcontainers+couchbase@10.12.0/node_modules/@testcontainers/couchbase/build/couchbase-container.js /Users/joeygreco/my_repo/node_modules/.pnpm/@testcontainers+couchbase@10.12.0/node_modules/@testcontainers/couchbase/build/index.js src/issue.test.ts
at Resolver._throwModNotFoundError (../../../node_modules/.pnpm/jest-resolve@29.7.0/node_modules/jest-resolve/build/resolver.js:427:11) at Object. (../../../node_modules/.pnpm/@testcontainers+couchbase@10.12.0/node_modules/@testcontainers/couchbase/src/couchbase-container.ts:10:1)
at Object. (../../../node_modules/.pnpm/@testcontainers+couchbase@10.12.0/node_modules/@testcontainers/couchbase/src/index.ts:1:1)
at Object. (src/issue.test.ts:1:1)
Additionally, these imports are not exported in the
@testcontainers/couchbase
npm package:Environment Information
Thanks!