node-3d / glfw-raub

GLFW for Node.js
https://github.com/node-3d/node-3d
MIT License
60 stars 12 forks source link

Cannot install #14

Closed ci010 closed 3 years ago

ci010 commented 3 years ago

it seems the install is using the process.env.npm_package_config_install, and it's missing:

https://github.com/node-3d/glfw-raub/releases/download/undefined/windows.zip

There are multiple packages raub have this problem.

raub commented 3 years ago

What is your package manager? It is not NPM, is it? See here: https://docs.npmjs.com/cli/v7/configuring-npm/package-json#config - there is this NPM feature allowing to add config variables, and it should work for NPM @6 @7

Well, anyway, I think this issue should be dealt with, in a way that works for everyone. I'll report back, when I come up with something

ci010 commented 3 years ago

Ah, I see the config in your package.json in my node_modules. I'm using the npm 7.0.11 with node v15.0.1. It seems it's not working when I install it...

Rcsuax commented 3 years ago

I am also seeing a similar issue on osx Catalina 10.15.5. after running npm i glfw-raub and also trying npm i git+https://github.com/node-3d/glfw-raub.git

xxxxs-MBP:scrap rcsx$ npm i glfw-raub npm ERR! code 255 npm ERR! path /Users/rcsx/Scratch/node/scrap/node_modules/glfw-raub npm ERR! command failed npm ERR! command sh -c node install npm ERR! https://github.com/node-3d/glfw-raub/releases/download/undefined/osx.zip npm ERR! Response status was 404

Rcsuax commented 3 years ago

upon further investigation after running npm i https://github.com/node-3d/glfw-raub/archive/refs/tags/4.5.1.tar.gz

npm ERR! code 255 npm ERR! path /Users/rcsx/Scratch/node/scrap/node_modules/deps-opengl-raub npm ERR! command failed npm ERR! command sh -c node install npm ERR! https://github.com/node-3d/deps-opengl-raub/releases/download/undefined/osx.zip npm ERR! Response status was 404

so perhap the issue is related to: deps-opengl-raub ?

raub commented 3 years ago

On Node.js 15.0.1 and NPM 6.14.11 it works. It looks like NPM@7 does not respect the package config any more. Is there any specific reason you use NPM@7 except it's the latest? As I was switching Node.js versions with NVM, I just got the defaults, and those were good enough. No leg shooting involved.

The patch would be, I guess, just to remove the config from package and use the immediate value in install.js.

Rcsuax commented 3 years ago

I have no specific reason for using npm7 and I have got it working on NPM@6. Can't see anything in the npm documentation about config vars being depreciated? perhaps a bug with NPM@7...

raub commented 3 years ago

The new glfw-raub@4.6.0 does not use npm_package_config_install and should now install properly with NPM@7.