justmoon / node-bignum

Big integers for Node.js using OpenSSL
420 stars 117 forks source link

error with npm install bignum on ubuntu 19.04 #121

Open parinaA opened 4 years ago

parinaA commented 4 years ago

On running the following command to install bignum

npm install bignum --save

I'm getting the error as:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bignum@0.13.0 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bignum@0.13.0 install script.

The complete error log is attached: 2019-10-28T15_10_53_233Z-debug.log

node : v 12.13.0 ubuntu : v 19.04 npm: v 6.12.0 python: v 2.7.16

0x70h commented 4 years ago

+1

malisetti commented 4 years ago

it fails to install with node latest versions v12 and v13 but installs good on ubuntu latest with node v10

ref: https://github.com/justmoon/node-bignum/pull/120

tomas-berg commented 4 years ago

Confirmed build failed on node v12 v13. Need support on newer Node versions. Please bump priority of this.

Dieken commented 4 years ago

Ubuntu 18.04 + node 12.16.1 + bignum 0.13.1 works.

username1565 commented 4 years ago

The same error I see on Windows 8.1 (x64), when bignum installing as node-module.

>node --version
v12.3.1

Try to start: npm install bignum ... downloading packages... then, this run node-gyp rebuild and...

gyp ERR! find VS
gyp ERR! find VS msvs_version was set from command line or npm config
gyp ERR! find VS - looking for Visual Studio version 2017
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found

I did try to install Visual Studio version 2017 on Windows 8.1 x64, but I got fail. This wants to be installed update package: KB2919355. image

Tried to install this, but... Picrelated: update-not-applicable 1

cclauss commented 4 years ago

Please paste ALL of the error text.

username1565 commented 4 years ago

@cclauss, what error do you mean? There is many different error. All this a one big and large error. bignum try to run node-gyp rebuild but this fails, because this wants to be installed Visual Studio 2017, but this can not be installed because some KB-updates must to be installed, but this can not be installed too... Maybe... node-gyp rebuild can working with VS2008 or something else... Or... Why to do not add a separate, independent, portable-compiler there?? And let this working on any windows on any platform, without that dependencies...

cclauss commented 4 years ago

All the text that starts with gyp ERR!

username1565 commented 4 years ago

@cclauss, this is that log, with modified pathways:

C:\MyFolder>npm install bignum

> bignum@0.13.1 install C:\MyFolder\node_modules\bignum
> node-gyp rebuild

C:\MyFolder\node_modules\bignum>if not defined npm_config_node_gyp (node "C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! find VS
gyp ERR! find VS msvs_version was set from command line or npm config
gyp ERR! find VS - looking for Visual Studio version 2017
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS valid versions for msvs_version:
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail (C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack     at C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack     at C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack     at C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack     at C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:301:5)
gyp ERR! stack     at ChildProcess.emit (events.js:200:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\nodeJS\\nodejs\\node.exe" "C:\\Users\\USERNAME\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\MyFolder\node_modules\bignum
gyp ERR! node -v v12.3.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bignum@0.13.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bignum@0.13.1 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\USERNAME\AppData\Roaming\npm-cache\_logs\2020-08-11T08_40_27_952Z-debug.log

C:\MyFolder>
cclauss commented 4 years ago

gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt

Run this command in the VS Command Prompt or set the shell variable VCINSTALLDIR to point to your Visual Studio 2019

cclauss commented 4 years ago

gyp ERR! find VS msvs_version was set from command line or npm config

Perhaps there is some clutter in npm config

username1565 commented 4 years ago

Set the shell variable VCINSTALLDIR to point to your Visual Studio 2019

I did try to install this, but got fail. Screens, you can see here: https://github.com/justmoon/node-bignum/issues/121#issuecomment-671322395 This is, after try to install Visual Studio 2019 Comidity, and this wanted to be installet some KB-updates, which can not be installed...

Also, I have sucessfully installed on Windows 8.1 x64, the Microsoft Visual C++ 2015-2019 Redistributable – 14.27.29016.0 (x64) (Stable version), and maybe, this must to have included MicroSoft Visual C++ 2015, MicroSoft Visual C++ 2017 and MicroSoft Visual C++ 2019... But I do not know in which folder this was been installed, and which folder need to specify, as the value of VCINSTALLDIR-parameter.

Perhaps there is some clutter in npm config

Need to write something like npm config set msvs_version 2017 --global, but Visual Studio 2017 can not be installed, so, after that, I just see:

gyp ERR! find VS
gyp ERR! find VS msvs_version was set from command line or npm config
gyp ERR! find VS - looking for Visual Studio version 2017
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS valid versions for msvs_version:
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail
... blahblah...
cclauss commented 4 years ago

Can you run Visual Studio and open a command prompt inside of Visual Studo?

cclauss commented 4 years ago

vswhere.exe -latest -property installationPath

username1565 commented 4 years ago

@cclauss No, I can not install Visual Studio 2017, without that KB-updates, which can not be installed, but I have already installed Visual Studio 2008, and I have the command prompt there, and can open this with an Administrative rights... But this do not want to VS2008, even VS2013... This wants VS2017, which can not be installed on Windows 8.1 x64.

cclauss commented 4 years ago

set msvs_version 2019 --global

cclauss commented 4 years ago

I have no way to test solutions on Windows 8.1 https://support.microsoft.com/en-us/help/13853/windows-lifecycle-fact-sheet

username1565 commented 4 years ago

This is problem with installation of Visual Studio 2017/2019 on Windows 8.1 x64. I have no installed this yet (just VS2008 installed), and can not install this. It wants to be installed some KB123456_SOME_DIGITS-UpdatePackages, but this packages can not be installed... Maybe I need to download the some installer, as one .zip, .exe, or .msi-file... Also, maybe, you can use VS2008, and provide the backward-compatibility for this version, to run node-gyp rebuild, if VS2008 is already installed.

cclauss commented 4 years ago

I have no way to test solutions on Windows 8.1 https://support.microsoft.com/en-us/help/13853/windows-lifecycle-fact-sheet