bug: Failed to resolve dependencies
Provide environment information
System: OS: macOS 14.6.1 CPU: (10) arm64 Apple M1 Max Memory: 1.04 GB / 32.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 20.16.0 - ~/.proto/shims/node npm: 10.8.2 - ~/.proto/shims/npm pnpm: 9.7.1 - ~/.proto/shims/pnpm bun: 1.1.24 - ~/.proto/shims/bun Watchman: 2024.03.18.00 - /opt/homebrew/bin/watchman
Describe the bug
I get the following error when trying to deploy an app within a pnpm monorepo that imports a workspace package "@repo/lib":
Failed to resolve dependencies: Command failed with exit code 1: npm install --package-lock-only --ignore-scripts --no-audit '--legacy-peer-deps=false' '--strict-peer-deps=false'
npm error code E404
npm error 404 Not Found - GET https://registry.npmjs.org/@repo%2flib - Not found
npm error 404
npm error 404 '@repo/[email protected]' is not in this registry.
npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.
...
The dependency is specified in the apps package.json like:
"@repo/lib": "workspace:*",
But I still get the error even if I add this to the config:
dependenciesToBundle: ["@repo/lib"],
Reproduction repo
You can run something like pnpx create-turbo@latest to create a similar pnpm monorepo to reproduce
To reproduce
See above
Additional information
No response
Hey @ianwalter, sorry for the slow reply. We have a preview version of our CLI which has some major changes to how we build code. It's designed to work way better in monorepos and generally be way easier to use. https://trigger.dev/docs/guides/new-build-system-preview
Monorepos work better since we changed the way we bundle dependencies. We also have a monorepo guide here: https://trigger.dev/docs/guides/example-projects/turborepo-monorepo-prisma