n-riesco / ijavascript

IJavascript is a javascript kernel for the Jupyter notebook
Other
2.18k stars 187 forks source link

Requirements to install IJavascript using Node.js v9, v10, v11 and above #184

Open n-riesco opened 5 years ago

n-riesco commented 5 years ago

I'm opening this issue so that I can close a number of duplicate issues reporting a failure to install IJavascript on Node.js v9 and above:

IJavascript depends on zeromq v4 that only provides prebuilt binaries to Node.js versions up to 8.

Users of Node.js v9 and above need the following requirements to install IJavascript:

For example, on an Ubuntu machine without internet access, the user would need to run the following:

$ sudo apt install libzmq3-dev build-essential python2.7
$ npm install -g ijavascript --zmq-external
n-riesco commented 5 years ago

I'm considering the following solutions to this issue:

rgbkrk commented 5 years ago

Yay for dropping support for old node that is before the long term stable releases.

whyboris commented 5 years ago

This is not a con:

drop support for Node.js v4 and v0.10

We should be actively discouraging people from using Node versions (v6 and older) that have reached their end of life 👍

johntron commented 5 years ago

Yeah, get rid of those ancient versions!

kaidatavis commented 5 years ago

I am new to Mac and stuck on the second last step of the installation instruction (the first 4 steps went well): npm install -g ijavascript

I have the latest Node (12.4.0) and NPM (6.9.0). It seems that the error is the c compiler (where is the config.log?):

checking whether the C compiler works... no
configure: error: in `/usr/local/lib/node_modules/ijavascript/node_modules/zeromq/zmq/zeromq-4.2.2':
configure: error: C compiler cannot create executables
See `config.log' for more details

I do have the gcc compiler:

(base) Kais-MBP:~ kai$ gcc -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Also, I have both python 2 (/usr/local/bin/python2) and python 3 (/anaconda3/bin/python3). Calling 'python' will run python 3 (3.7.3) not python 2 (2.7.16); I am not sure if this is an issue.

Below is the full output:

(base) Kais-MBP:~ kai$ npm install -g ijavascript
/usr/local/bin/ijs -> /usr/local/lib/node_modules/ijavascript/bin/ijavascript.js
/usr/local/bin/ijsconsole -> /usr/local/lib/node_modules/ijavascript/bin/ijsconsole.js
/usr/local/bin/ijsinstall -> /usr/local/lib/node_modules/ijavascript/bin/ijsinstall.js
/usr/local/bin/ijskernel -> /usr/local/lib/node_modules/ijavascript/lib/kernel.js
/usr/local/bin/ijsnotebook -> /usr/local/lib/node_modules/ijavascript/bin/ijsnotebook.js

> zeromq@4.6.0 install /usr/local/lib/node_modules/ijavascript/node_modules/zeromq
> node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)

prebuild-install WARN install No prebuilt binaries found (target=12.4.0 runtime=node arch=x64 platform=darwin)

Building libzmq for darwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '501' is supported by ustar format... yes
checking whether GID '20' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether make supports nested variables... (cached) yes
checking for gcc... x86_64-apple-darwin13.4.0-clang
checking whether the C compiler works... no
configure: error: in `/usr/local/lib/node_modules/ijavascript/node_modules/zeromq/zmq/zeromq-4.2.2':
configure: error: C compiler cannot create executables
See `config.log' for more details
child process exited with code 77
make: Entering directory '/usr/local/lib/node_modules/ijavascript/node_modules/zeromq/build'
  CXX(target) Release/obj.target/zmq/binding.o
../binding.cc:28:10: fatal error: 'zmq.h' file not found
#include <zmq.h>
         ^~~~~~~
1 error generated.
make: *** [zmq.target.mk:129: Release/obj.target/zmq/binding.o] Error 1
make: Leaving directory '/usr/local/lib/node_modules/ijavascript/node_modules/zeromq/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:200:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/ijavascript/node_modules/zeromq
gyp ERR! node -v v12.4.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zeromq@4.6.0 install: `node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the zeromq@4.6.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!     /Users/kai/.npm/_logs/2019-06-12T23_55_51_043Z-debug.log
(base) Kais-MBP:~ kai$ 
n-riesco commented 5 years ago

@kaimdx This may be an issue with your dev tools. Please, could you open a new issue?

To locate the 'config.log', I'd try to run:

find /usr/local/lib/node_modules/ijavascript/node_modules/zeromq -name config.log
pytkr commented 5 years ago

Hi! I successfully installed ijavascript as this:

conda update -c conda-forge nodejs
conda activate base
npm config set python "C:\Python27\python.exe"
(**open cmd as administrator**) npm install --global --production windows-build-tools
npm install -g node-gyp
npm install -g ijavascript
ijsinstall

However, I open jupyter notebook and create javascript notebook, and it can't execute js code cell, and cmd shows error:

[I 10:08:56.307 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports internal/modules/cjs/loader.js:613 throw err; ^

Error: Cannot find module '../build/Release/zmq.node' Require stack:

  • C:\Users\welcome2\Miniconda3\node_modules\ijavascript\node_modules\zeromq\lib\index.js
  • C:\Users\welcome2\Miniconda3\node_modules\ijavascript\node_modules\zeromq\index.js
  • C:\Users\welcome2\Miniconda3\node_modules\ijavascript\node_modules\jmp\index.js
  • C:\Users\welcome2\Miniconda3\node_modules\ijavascript\node_modules\jp-kernel\lib\jp-kernel.js
  • C:\Users\welcome2\Miniconda3\node_modules\ijavascript\node_modules\jp-kernel\index.js
  • C:\Users\welcome2\Miniconda3\node_modules\ijavascript\lib\kernel.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15) at Function.Module._load (internal/modules/cjs/loader.js:526:27) at Module.require (internal/modules/cjs/loader.js:666:19) at require (internal/modules/cjs/helpers.js:16:16) at Object. (C:\Users\welcome2\Miniconda3\node_modules\ijavascript\node_modules\zeromq\lib\index.js:6:11) at Module._compile (internal/modules/cjs/loader.js:759:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10) at Module.load (internal/modules/cjs/loader.js:628:32) at Function.Module._load (internal/modules/cjs/loader.js:555:12) at Module.require (internal/modules/cjs/loader.js:666:19)

Then, I download libzmq and build using vs 2019, now I get zeromq-4.3.2\bin2\bin\Release\libzmq-v141-mt-4_3_2.dll, how to use this to make npm install zeromq successful?

n-riesco commented 4 years ago

I've just released IJavascript@5.2 that depends jp-kernel@2 and uses the new prebuilt binaries for zeromq@5. This should make life easier for those using recent versions of Node.

yozi-developer commented 4 years ago

I had the same issue on MacOS and nvm. I guess something is wrong in this case with the global installation. So, I had to install it locally

npm init npm install --save ijavascript (without -g key) added "start": "ijsnotebook" to the package.json npm start

sean-bai commented 4 years ago

Not sure how this bug happens, but I still have this problem even you update to use zeromq@5. The way I solve this:

Step1. npm install -g zeromq
Step2. npm install -g ijavascript   

npm detect a newer version zeromq@6 so it skip the installation of dependency zeromq@5. And then every thing works. Maybe you should consider using zeromq@6?

n-riesco commented 4 years ago

I don't have plans to upgrade to zeromq@6 while it remains in beta.

Also note that zeromq@6 still lacks some binaries (e.g. see https://github.com/zeromq/zeromq.js/issues/396).

ozbigcat commented 4 years ago

I think I found the culprit of this problem. In my windows box, all the npm installed module are line up nicely in the folder: "C:\Users\\AppData\Roaming\npm\node_modules", including:

However, the kernel complains of not finding the zmq.node in the folder: "C:\Users\\AppData\Roaming\npm\node_modules\ijavascript\node_modules\"

So, I just copy manually the zeromq folder from [...\npm\node_modules] to [...\npm\node_modules\ijavascript\node_modules] and the kernel start working without a hitch in the notebook.

The zeromq folder was actually there, only missing the /Release folder that contains the zmq.node

In my opinion looks like just a matter of missing "/" in the path variable. The ijavascript is not supposed to have its own /node_modules/, isn't it?

As a recap, all the installation I did were: npm install --global --production windows-build-tools --vs2015 npm install -g zeromq@5 npm install -g node-gyp npm install -g ijavascript ijsinstall

Good stuff guys!

talelamira commented 4 years ago

Thank you @ozbigcat This solution worked for me

diegoasanch commented 3 years ago

Thanks @ozbigcat It worked for me too!

KrishnarajT commented 3 years ago

Thank you so much @ozbigcat The solution worked perfectly for me, id been digging for a day!

L4yman43 commented 6 months ago

I am new to programming, and am attempting to setup my Jupyternotebook with the JS kernel as well.

After spending 5-6 hours trying everything I am completely stuck. The issue seems to be with compatibility.

npm install -g zeromq@5 npm ERR! code 1 npm ERR! path C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp-build || npm run build:libzmq npm ERR! prepare-build npm ERR! Downloading libzmq for Windows npm ERR! Download finished npm ERR! binding.cc npm ERR! C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\binding.cc(399,10): warning C4996: 'Nan::MakeCallback': was declared deprecated [C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\build\zmq.vcxproj] npm ERR! C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\binding.cc(407,10): warning C4996: 'Nan::MakeCallback': was declared deprecated [C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\build\zmq.vcxproj] npm ERR! C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\binding.cc(458,10): warning C4996: 'Nan::MakeCallback': was declared deprecated [C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\build\zmq.vcxproj] npm ERR! C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\binding.cc(473,10): warning C4996: 'Nan::MakeCallback': was declared deprecated [C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\build\zmq.vcxproj] npm ERR! C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\binding.cc(814,10): warning C4996: 'Nan::MakeCallback': was declared deprecated [C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\build\zmq.vcxproj] npm ERR! C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\binding.cc(893,10): warning C4996: 'Nan::MakeCallback': was declared deprecated [C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\build\zmq.vcxproj] npm ERR! C:\Users\Kolo\AppData\Local\node-gyp\Cache\21.6.2\include\node\v8-local-handle.h(253,42): error C2338: static_assert failed: 'type check' [C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\build\zmq.vcxproj] npm ERR! (compiling source file '../binding.cc') npm ERR! C:\Users\Kolo\AppData\Local\node-gyp\Cache\21.6.2\include\node\v8-local-handle.h(253,42): npm ERR! the template instantiation context (the oldest one first) is npm ERR! C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\node_modules\nan\nan_callbacks_12_inl.h(175,41): npm ERR! see reference to function template instantiation 'v8::Local::Local(v8::Local)' being compiled npm ERR! C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\node_modules\nan\nan_callbacks_12_inl.h(175,13): npm ERR! see the first reference to 'v8::Local::Local' in 'Nan::imp::FunctionCallbackWrapper' npm ERR! npm ERR! npm ERR! > zeromq@5.3.1 build:libzmq npm ERR! > node-gyp rebuild npm ERR! npm ERR! npm ERR! npm ERR! prepare-build npm ERR! binding.cc npm ERR! C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\binding.cc(399,10): warning C4996: 'Nan::MakeCallback': was declared deprecated [C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\build\zmq.vcxproj] npm ERR! C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\binding.cc(407,10): warning C4996: 'Nan::MakeCallback': was declared deprecated [C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\build\zmq.vcxproj] npm ERR! C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\binding.cc(458,10): warning C4996: 'Nan::MakeCallback': was declared deprecated [C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\build\zmq.vcxproj] npm ERR! C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\binding.cc(473,10): warning C4996: 'Nan::MakeCallback': was declared deprecated [C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\build\zmq.vcxproj] npm ERR! C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\binding.cc(814,10): warning C4996: 'Nan::MakeCallback': was declared deprecated [C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\build\zmq.vcxproj] npm ERR! C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\binding.cc(893,10): warning C4996: 'Nan::MakeCallback': was declared deprecated [C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\build\zmq.vcxproj] npm ERR! C:\Users\Kolo\AppData\Local\node-gyp\Cache\21.6.2\include\node\v8-local-handle.h(253,42): error C2338: static_assert failed: 'type check' [C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\build\zmq.vcxproj] npm ERR! (compiling source file '../binding.cc') npm ERR! C:\Users\Kolo\AppData\Local\node-gyp\Cache\21.6.2\include\node\v8-local-handle.h(253,42): npm ERR! the template instantiation context (the oldest one first) is npm ERR! C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\node_modules\nan\nan_callbacks_12_inl.h(175,41): npm ERR! see reference to function template instantiation 'v8::Local::Local(v8::Local)' being compiled npm ERR! C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\node_modules\nan\nan_callbacks_12_inl.h(175,13): npm ERR! see the first reference to 'v8::Local::Local' in 'Nan::imp::FunctionCallbackWrapper' npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@10.0.1 npm ERR! gyp info using node@21.6.2 | win32 | x64 npm ERR! gyp info find Python using Python version 3.12.2 found at "C:\Users\Kolo\AppData\Local\Programs\Python\Python312\python.exe" npm ERR! gyp info find VS using VS2022 (17.9.34616.47) found at: npm ERR! gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community" npm ERR! gyp info find VS run with --verbose for detailed information npm ERR! gyp info spawn C:\Users\Kolo\AppData\Local\Programs\Python\Python312\python.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'C:\Users\Kolo\AppData\Roaming\npm\node_modules\node-gyp\gyp\gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'msvs', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\build\config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\Kolo\AppData\Roaming\npm\node_modules\node-gyp\addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\Kolo\AppData\Local\node-gyp\Cache\21.6.2\include\node\common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\Kolo\AppData\Local\node-gyp\Cache\21.6.2', npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Users\Kolo\AppData\Roaming\npm\node_modules\node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\Kolo\\AppData\\Local\\node-gyp\\Cache\\21.6.2\\<(target_arch)\\node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'build\binding.sln', npm ERR! gyp info spawn args '/clp:Verbosity=minimal', npm ERR! gyp info spawn args '/nologo', npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64' npm ERR! gyp info spawn args ] npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess. (C:\Users\Kolo\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:209:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:519:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12) npm ERR! gyp ERR! System Windows_NT 10.0.22631 npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Kolo\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq npm ERR! gyp ERR! node -v v21.6.2 npm ERR! gyp ERR! node-gyp -v v10.0.1 npm ERR! gyp ERR! not ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@10.0.1 npm ERR! gyp info using node@21.6.2 | win32 | x64 npm ERR! gyp info find Python using Python version 3.12.2 found at "C:\Users\Kolo\AppData\Local\Programs\Python\Python312\python.exe" npm ERR! gyp info find VS using VS2022 (17.9.34616.47) found at: npm ERR! gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community" npm ERR! gyp info find VS run with --verbose for detailed information npm ERR! gyp info spawn C:\Users\Kolo\AppData\Local\Programs\Python\Python312\python.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'msvs', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\build\config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\Kolo\AppData\Local\node-gyp\Cache\21.6.2\include\node\common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\Kolo\AppData\Local\node-gyp\Cache\21.6.2', npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\Kolo\\AppData\\Local\\node-gyp\\Cache\\21.6.2\\<(target_arch)\\node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq\build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'build\binding.sln', npm ERR! gyp info spawn args '/clp:Verbosity=minimal', npm ERR! gyp info spawn args '/nologo', npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64' npm ERR! gyp info spawn args ] npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:209:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:519:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12) npm ERR! gyp ERR! System Windows_NT 10.0.22631 npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd C:\Users\Kolo\AppData\Roaming\npm\node_modules\zeromq npm ERR! gyp ERR! node -v v21.6.2 npm ERR! gyp ERR! node-gyp -v v10.0.1 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: C:\Users\Kolo\AppData\Local\npm-cache_logs\2024-02-24T23_40_00_007Z-debug-0.log vi These are my Visual Studio 22 with all the C++ Developmental Tools and Node.js tools (Optional also) +-- node-gyp@10.0.1 `-- zeromq@6.0.0-beta.19 node -v v21.6.2

Can anybody suggest whats the next step. Seems the issue is in installing zeromq@5 not 6, and it simply wont install.

n-riesco commented 6 months ago

@L4yman43 It's likely an issue with Node.js v21 (unstable). I've just tested the installation on Node.js 20 (linux) and it's working. Please, try with Node.js v20 and let me know if it doesn't work for you.

Evand3r commented 1 month ago

Tried with Node 18 and Node 20 on macOS, same issue.

n-riesco commented 1 month ago

@Evand3r I've just tested ijavascript using Node 20 on linux and it's working for me. Could you open a new issue and post the error message, please?

Evand3r commented 1 month ago

Sorry but it's too annoying, tried some of the steps here and some of the other stuff mentioned in this thread but still got different issues on different scenarios. I gave up and installed Deno, has a working kernel out of the box that just needs one command.

n-riesco commented 1 month ago

@Evand3r It's nice to see that Deno supports a jupyter kernel with their own bindings to zeromq!

chusc123 commented 1 month ago

Tried with Node 18 and Node 20 on macOS, same issue.

Mine works great on MacOS with Node 20.

You should consider typing "!node -v" and "!which node" and "!which npm" and "!npm version" in your Jupyter notebook cells to make sure that your jupyter notebook environment is working from and installing on the same node version that you installed with home-brew for instance, because I had an issue on linux where I installed node 20 on the system directly, but anaconda was linked to it's own version of node 22 and thus I was getting the node 22 error and using node 22 even though I thought I was working from node 20.