Cannot install node-raylib on Kali Linux
I have the following installed:
- Kali Linux
- Node 12.18.3
- Npm 6.14.6
- Cmake 3.17
- Cmake-js 6.1.0
However, when attempted to use npm install raylib I receive an error saying that npm ERR! [email protected] postinstall: 'cmake-js compile' Exit status 1
I see that other people have issues using node versions between 12.17 - 12.18. Maybe this needs attention?
I also have the same issue when installing node-raylib 0.6.0 on:
- Arch Linux
- Linux 5.8.13
- NVM 0.36.0 (AUR)
- Node.js 14.13.0 (installed using nvm, not Arch package)
- NPM 6.14.8
- CMake 3.18.3
- CMake-js 6.1.0
Also with exit status 1. Here is the log.
Some of the errors were like this:
In file included from /home/delta/.nvm/versions/node/v14.13.0/lib/node_modules/raylib/src/addon.cc:6:
/home/delta/.nvm/versions/node/v14.13.0/lib/node_modules/raylib/src/node-raylib.h:
In function ‘void node_raylib_bindings_functions(Napi::Env&, Napi::Object&)’:
/home/delta/.nvm/versions/node/v14.13.0/lib/node_modules/raylib/src/node-raylib.h:291:48:
error: ‘IsWindowFocused’ was not declared in this scope; did you mean ‘IsWindowResized’?
291 | AddFunction(env, exports, "IsWindowFocused", IsWindowFocused);
| ^~~~~~~~~~~~~~~
| IsWindowResized
/home/delta/.nvm/versions/node/v14.13.0/lib/node_modules/raylib/src/node-raylib.h:313:50:
error: ‘GetWindowScaleDPI’ was not declared in this scope
313 | AddFunction(env, exports, "GetWindowScaleDPI", GetWindowScaleDPI);
| ^~~~~~~~~~~~~~~~~
/home/delta/.nvm/versions/node/v14.13.0/lib/node_modules/raylib/src/node-raylib.h:586:47:
error: ‘DrawTriangle3D’ was not declared in this scope; did you mean ‘DrawTriangle’?
586 | AddFunction(env, exports, "DrawTriangle3D", DrawTriangle3D);
| ^~~~~~~~~~~~~~
| DrawTriangle
/home/delta/.nvm/versions/node/v14.13.0/lib/node_modules/raylib/src/node-raylib.h:587:52:
error: ‘DrawTriangleStrip3D’ was not declared in this scope; did you mean ‘DrawTriangleStrip’?
587 | AddFunction(env, exports, "DrawTriangleStrip3D", DrawTriangleStrip3D);
| ^~~~~~~~~~~~~~~~~~~
| DrawTriangleStrip
and so on with similar messages.
It ends with this:
make[2]: *** [CMakeFiles/node-raylib.dir/build.make:82: CMakeFiles/node-raylib.dir/src/addon.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/node-raylib.dir/all] Error 2
make: *** [Makefile:103: all] Error 2
ERR! OMG Process terminated: 2
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `cmake-js compile`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/delta/.npm/_logs/2020-10-11T08_36_11_716Z-debug.log
I'm having the same issue on manjaro linux
I'm having the same issue on manjaro linux
Uninstalling raylib installed by pacman solved the issue for me.