eirslett / frontend-maven-plugin

"Maven-node-grunt-gulp-npm-node-plugin to end all maven-node-grunt-gulp-npm-plugins." A Maven plugin that downloads/installs Node and NPM locally, runs NPM install, Grunt, Gulp and/or Karma.
Apache License 2.0
4.22k stars 868 forks source link

Support for pnpm v6 #966

Open noblica opened 3 years ago

noblica commented 3 years ago

Currently, the pnpm install looks for pnpm.js, yet in version 6 they renamed the file to pnpm.cjs, so the install breaks. Could we get support for this as well?

Tagging @bmarwell , since he did the awesome pnpm PR previously :)

eirslett commented 3 years ago

I suppose we could check for the existence of pnpm.cjs and then use that, otherwise fallback to pnpm.js. Feel free to open a PR.

bmarwell commented 3 years ago

I might do this! I hope I can do this by the end of the week.

noblica commented 3 years ago

Hey @bmarwell , any news about this? :slightly_smiling_face:

bmarwell commented 3 years ago

No, but I have it on my roadmap. Once I get to work, it is probably done quickly. ;)

karlvr commented 3 years ago

Fantastic, thanks @bmarwell

noblica commented 3 years ago

Thanks a lot @bmarwell ! I see @eirslett released a new version of frontend-maven-plugin. That's great! 🎉

But it seems that this PR didn't make it in that release, or am I wrong? I'm still getting an error, that the pnpm.js file cannot be found :thinking: Screenshot from 2021-05-13 11-21-49

eirslett commented 3 years ago

It was part of the release, so something must be wrong I suppose.

bmarwell commented 3 years ago

D'oh! The PnpmRunner.java is initialized before the actual download seems to occur. :-( Need to rethink how this could be made possible. Can someone please create a minimal project so we can add this as an IT?

noblica commented 3 years ago

Since this is not done, should this issue be reopened?

bmarwell commented 3 years ago

Yes!

peschee commented 2 years ago

@eirslett Any chance this gets into a next release any time soon?

eirslett commented 2 years ago

@eirslett Any chance this gets into a next release any time soon?

It should be released in 1.12.1 I think. EDIT: well it is released, but as you can read from the thread, there's a bug in the implementation.

bmarwell commented 2 years ago

Hi @eirslett the "non-fix" was merged, but it did not work. Everything gets initialized before we can chack for the proper binary. :(

https://github.com/eirslett/frontend-maven-plugin/issues/966#issuecomment-842527971

Jdruwe commented 2 years ago

So does this mean pnpm v6 is not supported at this moment @bmarwell?

bmarwell commented 2 years ago

Haven't tried it for a while now, but yes => That is what I read from it.

bmarwell commented 2 years ago

Can someone please create a minimal project so we can add this as an IT?

Will code for minimal project. 😅

caocuong2404 commented 2 years ago

The simple command for u 🐧: npx --yes pnpm@6 install

bmarwell commented 2 years ago

We know how to install it, but we don't know the version that early in the process (the API is a little bit too static).

eloyAM commented 1 year ago

Still having troubles with this :( Using the plugin version 1.11.3 as I'm forced to use Java 8 and Maven 3.5.4 With nodeVersion 18.14.0 and pnpmVersion 7.26.3

bmarwell commented 1 year ago

I switched back to npm for now, because I was not able to fix this using the current API.

jonkoops commented 10 months ago

This issue seems to have been resolved, I am no longer able to reproduce it any longer.