n-riesco / ijavascript

IJavascript is a javascript kernel for the Jupyter notebook
Other
2.19k stars 185 forks source link

Workaround for failed installation in Windows #221

Open n-riesco opened 4 years ago

n-riesco 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!

Originally posted by @ozbigcat in https://github.com/n-riesco/ijavascript/issues/184#issuecomment-648099028

n-riesco commented 4 years ago

I've opening a new issue to give more visibility to this workaround, and because it's possibly an issue different from #184.


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?

It's OK for npm packages to have their own node_folder. This is handled by npm.

Another possible explanation is the version of node-gyp. Your instructions above show zeromq was installed before node-gyp, and ijavascript after. Perhaps the version of node-gyp installed globally is incompatible with ijavascript.

ozbigcat commented 4 years ago

additional info: the installation described above only be done after following the 'normal' installation and failed.

I. e: don't have node-gyp, zeromq@5 nor vs2015 before that. in other word, I am implying that maybe the work around works without having to install node-gyp by itself?

I think it is all boil down to why zeromq's "/Release" folder and its contents was missing in ijavascript's zeromq's node_module....

thanks..

rpalloni commented 3 years ago

Confirm workaround works (Win10). Just for clarification: content in AppData\Roaming\npm\node_modules\zeromq\build has to be copied in AppData\Roaming\npm\node_modules\ijavascript\node_modules\zeromq\build (empty)

ghost commented 3 years ago

Tested on: Windows:

Edition Windows 10 Pro for Workstations
Version 20H2
Installed on    ‎9/‎8/‎2020
OS build    19042.804
Experience  Windows Feature Experience Pack 120.2212.551.0

Environment:

node -v
v15.0.1
npm -v
7.0.3
yarn -v
1.22.5

Installation process walkthrough:

  1. install studio 2019 community
  2. add "Desktop development with C++" 2.1. manually select in "individual components" "MSVC v140 - VS 2015 C++ build tools (v14.00)"
  3. reboot
  4. run as admin powershell
  5. execute
    npm install --global --production windows-build-tools --vs2015
    npm install -g node-gyp
    npm install -g zeromq@5
    npm install -g ijavascript
  6. change policy with:
    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
  7. run
    ijsinstall
  8. restore policy with
    Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope CurrentUser
  9. close console.
  10. enjoy your new kernel.