#Updated to 4.0.3 and now build breaks

1 messages · Page 1 of 1 (latest)

tight flicker
#

X Error: Build failed with 1 error:
../../../../Library/Caches/pnpm/dlx/8ac57c662c193f1ac4936ac453ef8384b56c88480fe7fff8f2f2a2770152be00/1995ed2866c-d11f/node_modules/@trigger.dev/schema-to-json/dist/esm/index.js:4:47: ERROR: Could not resolve "effect"

novel kindleBOT
#

Hi @tight flicker. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

The error message you’re seeing:

ERROR: Could not resolve "effect"

indicates that the build process is unable to find the "effect" package, which is likely a dependency required by @trigger.dev/schema-to-json.

What to do:

  • Ensure that the "effect" package is installed in your project. You can do this by running:

    npm install effect
    

    or, if you use pnpm:

    pnpm add effect
    
  • If "effect" is a native package or has native dependencies, you may need to add it to the external array in your trigger.config.ts file to prevent bundling issues. For example:

    import { defineConfig } from "@trigger.dev/sdk";
    
    export default defineConfig({
      project: "<project ref>",
      build: {
        external: ["effect"],
      },
    });
    

    This approach is recommended for any package that cannot be bundled, as described in the documentation for handling native modules and external dependencies Docs: Build configuration.

If you continue to have issues after installing the package and updating your config, try running the build with debug logging for more details:

npx trigger.dev@latest deploy --log-level debug

or do a dry run to inspect the build output:

npx trigger.dev@latest deploy --dry-run

as suggested in the troubleshooting guides Docs: Troubleshooting, Docs: Custom build extensions troubleshooting.

If the problem persists, consider reaching out on the Trigger.dev Discord for further help, as recommended in the troubleshooting documentation.

#

Summary:
Install the missing "effect" package and, if necessary, add it to your external build config. If issues persist, use debug logs or dry run for more details and seek help via the official support channels.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: