Skip to content

Errors loading CLI dependencies in nextjs project but they are not needed #677

@rduque1

Description

@rduque1

Hi I am using umzug "umzug": "^3.8.1 in a nextjs project and run the migration programmatically.
I was wondering if the dependencies for the CLI can be loaded dynamically as I have the impression they generate errors and are not needed.

This is what the error trace I have:

Import trace for requested module:
./node_modules/umzug/lib/umzug.js
./node_modules/umzug/lib/index.js
./app/lib/server/mongodb.ts
./app/[lang]/layout.tsx
 ⚠ ./node_modules/@rushstack/node-core-library/lib/FileWriter.js
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

Import trace for requested module:
./node_modules/@rushstack/node-core-library/lib/FileWriter.js
./node_modules/@rushstack/node-core-library/lib/index.js
./node_modules/@rushstack/terminal/lib/NormalizeNewlinesTextRewriter.js
./node_modules/@rushstack/terminal/lib/index.js
./node_modules/@rushstack/ts-command-line/lib/providers/CommandLineParser.js
./node_modules/@rushstack/ts-command-line/lib/index.js
./node_modules/umzug/lib/cli.js
./node_modules/umzug/lib/index.js
./app/lib/server/mongodb.ts
./app/[lang]/layout.tsx

I am using the MongoDBStorage in my Umzug configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions