node-gradle / gradle-node-plugin

Gradle plugin for integrating NodeJS in your build. :rocket:
Apache License 2.0
601 stars 117 forks source link

Deprecation warnings when running `yarnSetup` #239

Open boris-petrov opened 2 years ago

boris-petrov commented 2 years ago
> Task :subproject:yarnSetup
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

changed 1 package, and audited 2 packages in 835ms

found 0 vulnerabilities

This is something new I believe. I guess it comes from here.

deepy commented 2 years ago

Which npm version are you using? I don't see this in the documentation for 8.x and I'm not getting the warning on 8.5.0 either

boris-petrov commented 2 years ago

@deepy note that this is for the yarnSetup task - that is, when installing yarn. My global npm version is 8.5.5, but I'm not sure that's relevant?

deepy commented 2 years ago

The way yarn is being installed is through running pretty much npm install --global --no-save --prefix <a folder in your build directory> yarn@yarnversion

This uses the npm bundled with your nodejs version in the case of download = true and your local npm otherwise.

I'll continue looking into this though, thanks for reporting it!

antecrescent commented 2 years ago

This started happening for me as well, when I updated npm from 8.11.0 to 8.15.0.

deepy commented 2 years ago

Not happening for me with 8.15.0 ._.

root@628d2222b553:/test# npm --version
8.15.0
root@628d2222b553:/test# npm install --global --no-save --prefix prefixdir npm@8.15.0

added 1 package, and audited 202 packages in 4s

11 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

But at least now that I have a version where I know it should happen it should be easier to find it, unfortunately I'm on the train and the network here is bad