RobLoach / node-raylib

Node.js bindings for Raylib
https://robloach.github.io/node-raylib/
Other
245 stars 20 forks source link

Can't install the global CLI #87

Closed RafaelOliveira closed 3 years ago

RafaelOliveira commented 3 years ago

I have installed windows 10 node v16.2.0 cmake 3.20.2 Visual Studio 2019

C:\Dev\Scripts>npm install raylib --global
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path C:\Users\rafah\AppData\Roaming\nvm\v16.2.0\node_modules\raylib
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c cmake-js compile
npm ERR! [
npm ERR!   'C:\\Program Files\\nodejs\\node.exe',
npm ERR!   'C:\\Users\\rafah\\AppData\\Roaming\\nvm\\v16.2.0\\node_modules\\raylib\\node_modules\\cmake-js\\bin\\cmake-js',
npm ERR!   'compile'
npm ERR! ]
npm ERR! Not searching for unused variables given on the command line.
npm ERR! -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19042.
npm ERR! -- The C compiler identification is MSVC 19.28.29915.0
npm ERR! -- The CXX compiler identification is MSVC 19.28.29915.0
npm ERR! -- Detecting C compiler ABI info
npm ERR! -- Detecting C compiler ABI info - done
npm ERR! -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
npm ERR! -- Detecting C compile features
npm ERR! -- Detecting C compile features - done
npm ERR! -- Detecting CXX compiler ABI info
npm ERR! -- Detecting CXX compiler ABI info - done
npm ERR! -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
npm ERR! -- Detecting CXX compile features
npm ERR! -- Detecting CXX compile features - done
npm ERR! -- Configuring incomplete, errors occurred!
npm ERR! See also "C:/Users/rafah/AppData/Roaming/nvm/v16.2.0/node_modules/raylib/build/CMakeFiles/CMakeOutput.log".
npm ERR! Not searching for unused variables given on the command line.
npm ERR! -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19042.
npm ERR! -- The C compiler identification is MSVC 19.28.29915.0
npm ERR! -- The CXX compiler identification is MSVC 19.28.29915.0
npm ERR! -- Detecting C compiler ABI info
npm ERR! -- Detecting C compiler ABI info - done
npm ERR! -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
npm ERR! -- Detecting C compile features
npm ERR! -- Detecting C compile features - done
npm ERR! -- Detecting CXX compiler ABI info
npm ERR! -- Detecting CXX compiler ABI info - done
npm ERR! -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
npm ERR! -- Detecting CXX compile features
npm ERR! -- Detecting CXX compile features - done
npm ERR! -- Configuring incomplete, errors occurred!
npm ERR! See also "C:/Users/rafah/AppData/Roaming/nvm/v16.2.0/node_modules/raylib/build/CMakeFiles/CMakeOutput.log".
npm ERR! info TOOL Using Visual Studio 16 2019 generator.
npm ERR! info CMD CONFIGURE
npm ERR! info RUN cmake "C:\Users\rafah\AppData\Roaming\nvm\v16.2.0\node_modules\raylib" --no-warn-unused-cli -G"Visual Studio 16 2019" -A"x64" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="C:\Users\rafah\AppData\Roaming\nvm\v16.2.0\node_modules\raylib\build" -DCMAKE_JS_INC="C:\Users\rafah\.cmake-js\node-x64\v16.2.0\include\node" -DCMAKE_JS_SRC="C:/Users/rafah/AppData/Roaming/nvm/v16.2.0/node_modules/raylib/node_modules/cmake-js/lib/cpp/win_delay_load_hook.cc" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="16.2.0" -DNODE_ARCH="x64" -DCMAKE_JS_LIB="C:\Users\rafah\.cmake-js\node-x64\v16.2.0\win-x64\node.lib" -DCMAKE_SHARED_LINKER_FLAGS="/DELAYLOAD:NODE.EXE"
npm ERR! CMake Warning at CMakeLists.txt:24 (find_package):
npm ERR!   By not providing "Findraylib.cmake" in CMAKE_MODULE_PATH this project has
npm ERR!   asked CMake to find a package configuration file provided by "raylib", but
npm ERR!   CMake did not find one.
npm ERR!
npm ERR!   Could not find a package configuration file provided by "raylib" (requested
npm ERR!   version 3.5.0) with any of the following names:
npm ERR!
npm ERR!     raylibConfig.cmake
npm ERR!     raylib-config.cmake
npm ERR!
npm ERR!   Add the installation prefix of "raylib" to CMAKE_PREFIX_PATH or set
npm ERR!   "raylib_DIR" to a directory containing one of the above files.  If "raylib"
npm ERR!   provides a separate development package or SDK, be sure it has been
npm ERR!   installed.
npm ERR!
npm ERR!
npm ERR! CMake Error at CMakeLists.txt:28 (add_subdirectory):
npm ERR!   add_subdirectory given source "vendor/raylib" which is not an existing
npm ERR!   directory.
npm ERR!
npm ERR!
npm ERR! info REP Build has been failed, trying to do a full rebuild.
npm ERR! info CMD CLEAN
npm ERR! info RUN cmake -E remove_directory "C:\Users\rafah\AppData\Roaming\nvm\v16.2.0\node_modules\raylib\build"
npm ERR! info CMD CONFIGURE
npm ERR! info RUN cmake "C:\Users\rafah\AppData\Roaming\nvm\v16.2.0\node_modules\raylib" --no-warn-unused-cli -G"Visual Studio 16 2019" -A"x64" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="C:\Users\rafah\AppData\Roaming\nvm\v16.2.0\node_modules\raylib\build" -DCMAKE_JS_INC="C:\Users\rafah\.cmake-js\node-x64\v16.2.0\include\node" -DCMAKE_JS_SRC="C:/Users/rafah/AppData/Roaming/nvm/v16.2.0/node_modules/raylib/node_modules/cmake-js/lib/cpp/win_delay_load_hook.cc" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="16.2.0" -DNODE_ARCH="x64" -DCMAKE_JS_LIB="C:\Users\rafah\.cmake-js\node-x64\v16.2.0\win-x64\node.lib" -DCMAKE_SHARED_LINKER_FLAGS="/DELAYLOAD:NODE.EXE"
npm ERR! CMake Warning at CMakeLists.txt:24 (find_package):
npm ERR!   By not providing "Findraylib.cmake" in CMAKE_MODULE_PATH this project has
npm ERR!   asked CMake to find a package configuration file provided by "raylib", but
npm ERR!   CMake did not find one.
npm ERR!
npm ERR!   Could not find a package configuration file provided by "raylib" (requested
npm ERR!   version 3.5.0) with any of the following names:
npm ERR!
npm ERR!     raylibConfig.cmake
npm ERR!     raylib-config.cmake
npm ERR!
npm ERR!   Add the installation prefix of "raylib" to CMAKE_PREFIX_PATH or set
npm ERR!   "raylib_DIR" to a directory containing one of the above files.  If "raylib"
npm ERR!   provides a separate development package or SDK, be sure it has been
npm ERR!   installed.
npm ERR!
npm ERR!
npm ERR! CMake Error at CMakeLists.txt:28 (add_subdirectory):
npm ERR!   add_subdirectory given source "vendor/raylib" which is not an existing
npm ERR!   directory.
npm ERR!
npm ERR!
npm ERR! ERR! OMG Process terminated: 1

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\rafah\AppData\Local\npm-cache\_logs\2021-05-22T19_51_05_823Z-debug.log
ChildishGiant commented 3 years ago

I'm having the same issue when installing locally.

PS E:\code\games\raylib\js\cards> npm install raylib --save
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported

> raylib@0.8.0 postinstall E:\code\games\raylib\js\cards\node_modules\raylib
> cmake-js compile

[
  'C:\\Program Files\\nodejs\\node.exe',
  'E:\\code\\games\\raylib\\js\\cards\\node_modules\\cmake-js\\bin\\cmake-js',
  'compile'
]
info TOOL Using Visual Studio 15 2017 Win64 generator.
info DIST Downloading distribution files.
http DIST       - https://nodejs.org/dist/v14.16.1/SHASUMS256.txt
http DIST       - https://nodejs.org/dist/v14.16.1/win-x64/node.lib
http DIST       - https://nodejs.org/dist/v14.16.1/node-v14.16.1-headers.tar.gz
info CMD CONFIGURE
info RUN cmake "E:\code\games\raylib\js\cards\node_modules\raylib" --no-warn-unused-cli -G"Visual Studio 15 2017 Win64" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="E:\code\games\raylib\js\cards\node_modules\raylib\build" -DCMAKE_JS_INC="C:\Users\allie\.cmake-js\node-x64\v14.16.1\include\node" -DCMAKE_JS_SRC="E:/code/games/raylib/js/cards/node_modules/cmake-js/lib/cpp/win_delay_load_hook.cc" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="14.16.1" -DNODE_ARCH="x64" -DCMAKE_JS_LIB="C:\Users\allie\.cmake-js\node-x64\v14.16.1\win-x64\node.lib" -DCMAKE_SHARED_LINKER_FLAGS="/DELAYLOAD:NODE.EXE"
Not searching for unused variables given on the command line.
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.19042.
-- The C compiler identification is MSVC 19.16.27045.0
-- The CXX compiler identification is MSVC 19.16.27045.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:24 (find_package):
  By not providing "Findraylib.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "raylib", but
  CMake did not find one.

  Could not find a package configuration file provided by "raylib" (requested
  version 3.5.0) with any of the following names:

    raylibConfig.cmake
    raylib-config.cmake

  Add the installation prefix of "raylib" to CMAKE_PREFIX_PATH or set
  "raylib_DIR" to a directory containing one of the above files.  If "raylib"
  provides a separate development package or SDK, be sure it has been
  installed.

CMake Error at CMakeLists.txt:28 (add_subdirectory):
  add_subdirectory given source "vendor/raylib" which is not an existing
  directory.

-- Configuring incomplete, errors occurred!
See also "E:/code/games/raylib/js/cards/node_modules/raylib/build/CMakeFiles/CMakeOutput.log".
info REP Build has been failed, trying to do a full rebuild.
info CMD CLEAN
info RUN cmake -E remove_directory "E:\code\games\raylib\js\cards\node_modules\raylib\build"
info CMD CONFIGURE
info RUN cmake "E:\code\games\raylib\js\cards\node_modules\raylib" --no-warn-unused-cli -G"Visual Studio 15 2017 Win64" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="E:\code\games\raylib\js\cards\node_modules\raylib\build" -DCMAKE_JS_INC="C:\Users\allie\.cmake-js\node-x64\v14.16.1\include\node" -DCMAKE_JS_SRC="E:/code/games/raylib/js/cards/node_modules/cmake-js/lib/cpp/win_delay_load_hook.cc" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="14.16.1" -DNODE_ARCH="x64" -DCMAKE_JS_LIB="C:\Users\allie\.cmake-js\node-x64\v14.16.1\win-x64\node.lib" -DCMAKE_SHARED_LINKER_FLAGS="/DELAYLOAD:NODE.EXE"
Not searching for unused variables given on the command line.
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.19042.
-- The C compiler identification is MSVC 19.16.27045.0
-- The CXX compiler identification is MSVC 19.16.27045.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:24 (find_package):
  By not providing "Findraylib.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "raylib", but
  CMake did not find one.

  Could not find a package configuration file provided by "raylib" (requested
  version 3.5.0) with any of the following names:

    raylibConfig.cmake
    raylib-config.cmake

  Add the installation prefix of "raylib" to CMAKE_PREFIX_PATH or set
  "raylib_DIR" to a directory containing one of the above files.  If "raylib"
  provides a separate development package or SDK, be sure it has been
  installed.

CMake Error at CMakeLists.txt:28 (add_subdirectory):
  add_subdirectory given source "vendor/raylib" which is not an existing
  directory.

-- Configuring incomplete, errors occurred!
See also "E:/code/games/raylib/js/cards/node_modules/raylib/build/CMakeFiles/CMakeOutput.log".
ERR! OMG Process terminated: 1
npm WARN cards@1.0.0 No description
npm WARN cards@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! raylib@0.8.0 postinstall: `cmake-js compile`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the raylib@0.8.0 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!     C:\Users\allie\AppData\Roaming\npm-cache\_logs\2021-05-23T15_44_28_599Z-debug.log
sheepsteak commented 3 years ago

I'm getting the same on MacOS. I compared 0.7.0 to 0.8.0 and the issue is that the vendor/raylib directory has not been included in the npm package for 0.8.0.

RobLoach commented 3 years ago

Ah, we should likely pack the submodules in the npm package. Good call!

RafaelOliveira commented 3 years ago

For me it's working now, thanks.