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

`pnpm` packaging not working

Open samchungy opened this issue 3 years ago • 7 comments

While working on #267, I could not get pnpm functionality to work.

  1. pnpm stores it's deps in a subdirectory node_modules/.pnpm/ or some npm_reg folder for older versions with {package}@{version} folders so the rest of the packaging logic doesn't pull it into external.
  2. It fails at the install command saying the lockfile is out of date.
  3. The list deps command is very broken because the list command without a depth only shows its top level dependencies.

At this point the pnpm functionality does not work. Not sure if there was a version which this is actually compatible with @floydspace? If you are after this functionality please leave a comment below and I'll try and find some time to work on it.

samchungy avatar Feb 09 '22 12:02 samchungy

Hey @samchungy, it was contributed by @lulzneko, to be honest, I haven't tested it and have never used it, maybe initially it worked. Please go ahead to fix it if possible.

floydspace avatar Feb 09 '22 20:02 floydspace

Hey @samchungy, it was contributed by @lulzneko, to be honest, I haven't tested it and have never used it, maybe initially it worked. Please go ahead to fix it if possible.

Okay good to know 😛 I'll see if I can get to it if I have time but otherwise I'll leave this issue here in case someone actually tries to use it.

samchungy avatar Feb 10 '22 00:02 samchungy

You can try with: installExtraArgs: --shamefully-hoist

vlechemin avatar Mar 10 '22 17:03 vlechemin

You can try with: installExtraArgs: --shamefully-hoist

Interesting, wasn't aware of that. tyvm I might be able to enable support with this in the future if I find some time

samchungy avatar Mar 10 '22 22:03 samchungy

Are you planning to fix it? In the documentation/configuration pnpm is listed as possible packager, the reality is that it is broken and not safe to use.. 😞

At least support installExtraArgs: --shamefully-hoist as this is acceptable workaround, thanks! 🙏

blazejkustra avatar Aug 31 '22 06:08 blazejkustra

I had a first take last week and discovered the incompatibility with lambda and the symlinked structure. I would absolutely love to fix this. But ultimately this is just a volunteer thing for me and sometimes it's quite hard to pick up the tools after work

samchungy avatar Aug 31 '22 07:08 samchungy

Is this fixed with v1.35.3? @floydspace

blazejkustra avatar Feb 16 '23 08:02 blazejkustra