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

npm install build avoidance doesn't work when download = true

Open Jazzepi opened this issue 8 years ago • 5 comments

I tried the plugin in it's default mode, using the installed version of NPM. This has download = false.

I then tried the plugin with download = true and the plugin did not provide any build avoidance for running npm install. G runs gradlew with gradle 3.2. I'm using Windows 7 64 bit with bash Git.

download = false

$ g npmInstall
:client:nodeSetup SKIPPED
:client:npmSetup SKIPPED
:client:npmInstall

> [email protected] postinstall C:\repos\terraforming-mars\client
> bower install

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

BUILD SUCCESSFUL

Total time: 12.955 secs

$ g npmInstall
:client:nodeSetup SKIPPED
:client:npmSetup SKIPPED
:client:npmInstall UP-TO-DATE

BUILD SUCCESSFUL

Total time: 1.088 secs

download = true

$ g npm_install
:client:nodeSetup
Download https://nodejs.org/dist/v6.9.1/node-v6.9.1-win-x64.zip
:client:npm_install

> [email protected] postinstall C:\repos\terraforming-mars\client
> bower install

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

BUILD SUCCESSFUL

Total time: 18.174 secs

$ g npm_install
:client:nodeSetup UP-TO-DATE
:client:npm_install

> [email protected] postinstall C:\repos\terraforming-mars\client
> bower install

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

BUILD SUCCESSFUL
Total time: 3.478 secs

Jazzepi avatar Dec 04 '16 10:12 Jazzepi

Well, download = true actually downloads Node (executing nodeSetup). So it seems to work in your example. Or something I did not catch from your example?

srs avatar Dec 04 '16 12:12 srs

Notice that when download is true npminstall runs and there is no build avoidance even though I have changed the package.json.

Jazzepi avatar Dec 04 '16 14:12 Jazzepi

Even though I have **NOT changed the package.json

Jazzepi avatar Dec 04 '16 14:12 Jazzepi

Oh, right. Now I see. Will flag this as a bug.

srs avatar Dec 04 '16 15:12 srs

Any idea when this is going to be fixed?

aj-dev avatar Sep 12 '18 06:09 aj-dev