serverless-esbuild icon indicating copy to clipboard operation
serverless-esbuild copied to clipboard

Recent change to package-lock.json path breaks npm workspaces

Open chrisui opened this issue 2 years ago • 1 comments

This change from 5 days ago has broken our builds because with npm workspaces we only have a project-lock.json at the root.

Perhaps this path needs to be variable based on the packager configured.

Originally posted by @chrisui in https://github.com/floydspace/serverless-esbuild/issues/199#issuecomment-930106781

chrisui avatar Sep 29 '21 14:09 chrisui

Yeah, so I made those changes, and I think we can find a middle ground.

Detection of a local package.json was the logic implemented to detect the use of monorepo. But because it was sought at root level, detection would always fail, what I did was to go back to a local detection. See, it is because I am using a monorepo with workspaces and because I need inclusion of externals that in my case installation with frozen lockfile would throw.

I think I know what your problem would be - but for the sake of drafting a PR that makes sense in every situation, could you please elaborate on your setup? What exactly in your build is broken ? are you using individual packaging? Do you have external libraries listed?

olup avatar Sep 29 '21 18:09 olup