Some common problems you might experience and their solutions
EACCES: permission denied.trigger folder in your project and delete it. You can then restart your local dev server.
--log-level debug at the end. This will spit out a lot of information about the deploy. If you can’t figure out the problem from the information below please join our Discord and create a help forum post. Do NOT share the extended debug logs publicly as they might reveal private information about your project.
You can also review the build by supplying the --dry-run flag. This will build your project but not deploy it. You can then inspect the build output on your machine.
Here are some common problems and their solutions:
Failed to build project image: Error building imageDeployment encountered an errorNo loader is configured for ".node" files.node files are native code and can’t be bundled like other packages. To fix this, add your package to build.external in the trigger.config.ts file like this:
Cannot find module '/app/lib/worker.js" when using pinoexternal build settings in your trigger.config.ts file. Learn more about the external setting in the config docs.
Cannot find matching keyidnpm i -g corepack@latestThe requested module 'node:events' does not provide an export named 'addAbortListener'| Version | Minimum |
|---|---|
| 18 | 18.20+ |
| 20 | 20.5+ |
| 21 | 21.0+ |
| 22 | 22.0+ |
Environment variable not found:Error: @prisma/client did not initialize yet.Parallel waits are not supportedwait.for()wait.until()task.triggerAndWait()task.batchTriggerAndWait()wait in the name.Promise.all around some of our wait functions. Instead of doing this use our built-in functions for triggering tasks. We have functions that allow you to trigger different tasks in parallel.
await when you call trigger, triggerAndWait, batchTrigger, and batchTriggerAndWait. If you don’t then it’s likely the task(s) won’t be triggered because the calling function process can be terminated before the networks calls are sent.
trigger() on a task in a loop, instead of doing this use batchTrigger() which will trigger multiple tasks in a single API call. You can have up to 100 tasks in a single batch trigger call.
View the rate limits page for more information.
Crypto is not definedCrypto without a special flag was added in Node v19.0.0. You will have to upgrade Node - we recommend even-numbered major releases, e.g. v20 or v22. Alternatively, you can switch from plain strings to the idempotencyKeys.create SDK function. Read the guide.
onClick prop. This is because the function may require specific arguments or context that are not available when the event occurs. By wrapping the function call in an arrow function, you ensure that the handler is called with the correct context and any necessary arguments. For example:
This works: