npm install drizzle Issures also web3

–Python version error

gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\python3\python.EXE -c import sys; print “%s.%s.%s” % sys.version_info[:3];
gyp ERR! stack File “”, line 1
gyp ERR! stack import sys; print “%s.%s.%s” % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax

–Reason: 1) python version should be pytho2.x 2) use node-gyp to install addons 3)when node-gyp rebuild, we should add environmental variables 4)we should have MSBuild.exe installed in our system.5)no binding.gyp found in “c:\users\administrator”

–How to resolved this problem:

–Add “C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin” into environment parameters

node-gyp rebuild ERROR because of no MSBuild.exe

–reinstall MS Build tools in official website :”
https://visualstudio.microsoft.com/downloads/#other

” Build Tools for Visual Studio 2019 “

OR run command belows:
npm install –global –production windows-build-tools in powershell under administrator mode


I create binding.gyp file manually under the path c:\users\leon\appdata\roaming\npm\node_modules\node-gyp with following content:
{
“targets”: [
{
“target_name”: “binding”,
“sources”: [ “build/Release/binding.node” ]
}
]
}.
After that, I run node-gyp rebuild command and the issue is solved.

–install MSBuild.exe

A lot of times dependencies in npm package use git://url instead of https://url a lot of people cannot install any such package as the clone fron git:// fails for some reason.

(for me it fails because my university’s proxy does not support it)

running:

 git config --global url."https://".insteadOf git://

tells git that whenever it encounters a git:// it should use https:// instead.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.