gradle-node-plugin icon indicating copy to clipboard operation
gradle-node-plugin copied to clipboard

Deprecation warnings when running `yarnSetup`

Open boris-petrov opened this issue 3 years ago • 5 comments

> 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.

boris-petrov avatar Jun 08 '22 11:06 boris-petrov

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

deepy avatar Jun 08 '22 11:06 deepy

@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?

boris-petrov avatar Jun 08 '22 12:06 boris-petrov

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!

deepy avatar Jun 09 '22 21:06 deepy

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

antecrescent avatar Jul 22 '22 20:07 antecrescent

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 [email protected]

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

deepy avatar Jul 23 '22 09:07 deepy