node-occ: Unable to install node-occ with npm

Hello, I am not able to install node-occ using npm. Could you provide any help on this regard? Please see below my error log. I am using Node v.10.15.3. Thank you!

PS C:\Users\giuli\Documents\3d-test\3d-test> npm install node-occ

> node-occ@0.3.0 install C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(404): https://github.com/openwebcad/node-occ/releases/download/0.3.0/occ-v0.3.0-node-v64-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for node-occ@0.3.0 and node@10.15.3 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
Warning: Missing input files:
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKFillet.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKGeomBase.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKShHealing.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKG3d.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKXSBase.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKBool.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKSTEP209.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKBRep.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKBO.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKSTL.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKOffset.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKTopAlgo.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKernel.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKSTEPBase.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKPrim.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKGeomAlgo.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKG2d.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKMesh.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\src\all.cc
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKMath.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKSTEPAttr.dll
C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\build\..\occt-7.2.0\win64\vc14\bin\TKSTEP.dll
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  all.cc
  win_delay_load_hook.cc
c1xx : fatal error C1083: Cannot open source file: '..\src\all.cc': No such file or directory [C:\Users\giuli\Documents\3
d-test\3d-test\node_modules\node-occ\build\occ.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\giuli\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\giuli\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\Users\\giuli\\Documents\\3d-test\\3d-test\\node_modules\\node-occ\\lib\\binding\\occ.node" "--module_name=occ" "--module_path=C:\\Users\\giuli\\Documents\\3d-test\\3d-test\\node_modules\\node-occ\\lib\\binding" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\giuli\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\lib\binding\occ.node --module_name=occ --module_path=C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\lib\binding --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Windows_NT 10.0.17763
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\giuli\\Documents\\3d-test\\3d-test\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ
node-pre-gyp ERR! node -v v10.15.3
node-pre-gyp ERR! node-pre-gyp -v v0.9.1
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\giuli\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\lib\binding\occ.node --module_name=occ --module_path=C:\Users\giuli\Documents\3d-test\3d-test\node_modules\node-occ\lib\binding --napi_version=3 --node_abi_napi=napi' (1)
npm WARN bootstrap@4.3.1 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-occ@0.3.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-occ@0.3.0 install 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\giuli\AppData\Roaming\npm-cache\_logs\2019-07-15T10_12_13_889Z-debug.log

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (4 by maintainers)

Most upvoted comments

@erossignon I’ve no Windows installed at the moment. However, if you can’t have time, I’ll setup a Windows and try to solve the problem ASAP.

Sorry, I was very busy these days. I’ll look at this ASAP.

Status

Currently I can only confirm that Windows installation does not seem to be straightforward. I need to take a break due to my own business. Here are the primary problems I’ve encountered:

  • README says “install oce-0.17 from https://github.com/tpaviot/oce/downloads”, however there is only oce-0.11 on that url.
  • I followed the same instructions by replacing “OCE-0.17” with “oce-0.11” but there is no success.

While compiling from source (following the instructions on wiki):

cd c:\
git clone https://github.com/tpaviot/oce.git
cd oce
git checkout OCE-0.17.2
cd ..
# git submodule update --init --recursive       <--- what is that for? we are both currently in C:\ and oce.git has no submodules declared.

Anyway, I continued the procedure:

C:\oce_build>cmake -D OCE_INSTALL_PREFIX:STRING='C:/OCE-0.17.2' -D OCE_DRAW:BOOL
EAN=FALSE -D OCE_OCAF:BOOLEAN=FALSE -D OCE_VISUALISATION:BOOLEAN=FALSE -D OCE_DI
SABLE_X11:BOOLEAN=TRUE -D OCE_USE_PCH:BOOLEAN=TRUE ../oce
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:20 (project):
  The CMAKE_C_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:20 (project):
  The CMAKE_CXX_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "C:/oce_build/CMakeFiles/CMakeOutput.log".
See also "C:/oce_build/CMakeFiles/CMakeError.log".

Installed dependencies:

I installed the following prerequisites:

  • Visual Studio 2015 Community Edition
  • DotNet 4.6
  • Node 6.9.3
  • CMake 3.7.1

…and tried

  • npm i -g node-pre-gyp
  • install python 3.7 (add python to PATH)

I’ll continue from where I left ASAP.