-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use packageManager
as a attempt to identify node package manager
#1263
Conversation
@coffee-cup I've fixed linting and improved documentation to state that now |
There's another problem when running with pnpm workspaces: In latest's pnpm version, only one lockfile is present in the root of the project, meaning no pnpm deploy --filter=<npm package name> ./target
cd target
pnpm build --filter=<npm package name>... Doing something like the above, deploy will install only the required dependencies into a subfolder build (with This is also how pnpm itself recommend building docker images. What do you think about this? |
We could even improve installing times by firstly copying only |
Thanks for the docs and lint fixes. I’m afk until Monday and will merge and release it then. Great ideas for improving the pnpm provider too. Fetching deps in an another layer would certainly help deploy times. I’m a bit unsure why it is an issue if there is only a single lockfile at the root though. Does that not work with the current system? |
If the lockfile is in the workspace's root and I build in a subfolder, pnpm inside docker will not be aware of the monorepo, nor local dependencies installed with |
Ah I see. Yes in that case it is recommended to build from the root and build a specific package with |
Hey @coffee-cup but in that case the build wouldn't invalidate its cache on any unrelated change across the entire workspace? |
When running nixpacks inside pnpm monorepos a lockfile will not be present at cwd, to avoid this problem it attempts to first read the package.json
packageManager
field before trying to read lockfiles until a match is found.Ideally would be great if we could choose a package manager as a configurable option for
nixpacks.toml
but since I did not see any other providers using dedicated configurations for a provider I was not sure if that's something desired to have...