bitcoinjs / bitcoinjs-lib

A javascript Bitcoin library for node.js and browsers.
MIT License
5.69k stars 2.11k forks source link

npm install --save bitcoinjs-lib #1358

Closed cancerts closed 5 years ago

cancerts commented 5 years ago

To install it, you can run: npm install --save bitcoinjs-lib 终止批处理操作吗(Y/N)? y'

C:\Users\Asus\Desktop\币彩\fbc>npm install --save bitcoinjs-lib

tiny-secp256k1@1.0.1 install C:\Users\Asus\Desktop\币彩\fbc\node_modules\tiny-secp256k1 node-gyp rebuild

C:\Users\Asus\Desktop\币彩\fbc\node_modules\tiny-secp256k1>if not defined npm_config_node_gyp (node "C:\Users\Asus\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\Asus\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "/path/to/executable/python2.7", you can set the PYTHON env variable. gyp ERR! stack at PythonFinder.failNoPython (C:\Users\Asus\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19) gyp ERR! stack at PythonFinder. (C:\Users\Asus\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16) gyp ERR! stack at C:\Users\Asus\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:282:31 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21) gyp ERR! System Windows_NT 10.0.17134 gyp ERR! command "D:\download\node.js\install\node.exe" "C:\Users\Asus\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\Asus\Desktop\币彩\fbc\node_modules\tiny-secp256k1 gyp ERR! node -v v10.15.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! tiny-secp256k1@1.0.1 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the tiny-secp256k1@1.0.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\Asus\AppData\Roaming\npm-cache_logs\2019-03-12T08_37_41_998Z-debug.log can fix this ...........................

aitorjs commented 5 years ago

I see this error: "Error: Can't find Python executable path/to/executable/python2.7", you can set the PYTHON env variable.". Try with Python 2.7 or setting PYTHON env variable.

cancerts commented 5 years ago

I see this error: "Error: Can't find Python executable path/to/executable/python2.7", you can set the PYTHON env variable.". Try with Python 2.7 or setting PYTHON env variable.

it work ok but not this

cancerts commented 5 years ago

i sole this with the https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules

Environment setup and configuration: Prerequisites Option 1: Install all the required tools and configurations using Microsoft's windows-build-tools by running npm install -g windows-build-tools from an elevated PowerShell (run as Administrator).

Option 2: Install dependencies and configuration manually

Install Visual C++ Build Environment: Visual Studio Build Tools (using "Visual C++ build tools" workload) or Visual Studio 2017 Community (using the "Desktop development with C++" workload) Install Python 2.7 (v3.x.x is not supported), and run npm config set python python2.7 Launch cmd, npm config set msvs_version 2017

=====================