-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Description
In a NestJS project, the package fails at runtime with the error:
file:///demo/node_modules/.pnpm/dataforseo-client@2.0.17/node_modules/dataforseo-client/dist/cjs/index.js:2
Object.defineProperty(exports, "__esModule", { value: true });
^
ReferenceError: exports is not defined
at file:///demo/node_modules/.pnpm/dataforseo-client@2.0.17/node_modules/dataforseo-client/dist/cjs/index.js:2:23
at ModuleJobSync.runSync (node:internal/modules/esm/module_job:400:35)
at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:427:47)
at loadESMFromCJS (node:internal/modules/cjs/loader:1561:24)
at Module._compile (node:internal/modules/cjs/loader:1712:5)
at Object..js (node:internal/modules/cjs/loader:1895:10)
at Module.load (node:internal/modules/cjs/loader:1465:32)
at Function._load (node:internal/modules/cjs/loader:1282:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
Environment
- Node.js version: 22.16
- dataforseo-client version: 2.0.17
Steps to Reproduce
- Set up a new NestJS project with:
pnpm add -g @nestjs/cli
nest new demo
- Install dataforseo-client@2.0.17
- Add the following example code to the main.ts file for testing:
import { BacklinksApi } from 'dataforseo-client';
new BacklinksApi();
- Run the project with
pnpm start:devto see the error.
Expected Behavior
Imports should work without throwing an error.
Current Behavior
The module fails to load with an export-undefined error.
Note: The last version of dataforseo-client I'm able to use without issue is 1.0.31.
Metadata
Metadata
Assignees
Labels
No labels