node-gyp rebuild is failing

Created on 31 May 2020  路  25Comments  路  Source: nodejs/node-gyp

  • Node Version:Node: v10.19.0 and NPM: 6.14.5
  • Platform: Ubuntu 20.04
  • Module: vscode-sqlite3

Verbose output (from npm or node-gyp):

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info find Python using Python version 2.7.18 found at "/usr/bin/python2"
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/share/nodejs/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/varun/Desktop/WorkSpace/vscode/node_modules/vscode-sqlite3/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/share/nodejs/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/include/nodejs/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/usr/include/nodejs',
gyp info spawn args   '-Dnode_gyp_dir=/usr/share/nodejs/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/usr/include/nodejs/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/varun/Desktop/WorkSpace/vscode/node_modules/vscode-sqlite3',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/varun/Desktop/WorkSpace/vscode/node_modules/vscode-sqlite3/build'
  ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3280000/sqlite3.c
/bin/sh: 1: python: not found
make: *** [deps/action_before_build.target.mk:13: Release/obj/gen/sqlite-autoconf-3280000/sqlite3.c] Error 127
make: Leaving directory '/home/varun/Desktop/WorkSpace/vscode/node_modules/vscode-sqlite3/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/nodejs/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.4.0-33-generic
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "configure" "build"
gyp ERR! cwd /home/varun/Desktop/WorkSpace/vscode/node_modules/vscode-sqlite3
gyp ERR! node -v v10.19.0
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok

Most helpful comment

This works for me :)

npm install -g node-gyp

export npm_config_node_gyp=/usr/local/lib/node_modules/node-gyp/bin/node-gyp.js

rm -rf node_modules(if already there)

npm install

All 25 comments

Please run the following commands:

  • python3 --version
  • python --version
  • py --version

python3 --version: Python 3.8.2
python2 --version: Python 2.7.18rc1

Please try: NODE_GYP_FORCE_PYTHON=python3 <your command goes here>

Hi @cclauss
I tried the proposed method, but it didn't work. For python3 getting the following error, and along with that, gyp application is crashing.

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info find Python using Python version 3.8.2 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [ '/usr/share/nodejs/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/varun/Desktop/WorkSpace/vscode/node_modules/vscode-sqlite3/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/share/nodejs/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/include/nodejs/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/usr/include/nodejs',
gyp info spawn args   '-Dnode_gyp_dir=/usr/share/nodejs/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/usr/include/nodejs/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/varun/Desktop/WorkSpace/vscode/node_modules/vscode-sqlite3',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
Traceback (most recent call last):
  File "/usr/share/nodejs/node-gyp/gyp/gyp_main.py", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3254, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3237, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3266, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 584, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 901, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 787, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'gyp==0.1' distribution was not found and is required by the application
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/nodejs/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.4.0-33-generic
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/varun/Desktop/WorkSpace/vscode/node_modules/vscode-sqlite3
gyp ERR! node -v v10.19.0
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok 

I also tried using python2 in place of python3, getting the following response:

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info find Python using Python version 2.7.18 found at "/usr/bin/python2"
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/share/nodejs/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/varun/Desktop/WorkSpace/vscode/node_modules/vscode-sqlite3/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/share/nodejs/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/include/nodejs/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/usr/include/nodejs',
gyp info spawn args   '-Dnode_gyp_dir=/usr/share/nodejs/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/usr/include/nodejs/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/varun/Desktop/WorkSpace/vscode/node_modules/vscode-sqlite3',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/varun/Desktop/WorkSpace/vscode/node_modules/vscode-sqlite3/build'
  ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3280000/sqlite3.c
/bin/sh: 1: python: not found
make: *** [deps/action_before_build.target.mk:13: Release/obj/gen/sqlite-autoconf-3280000/sqlite3.c] Error 127
make: Leaving directory '/home/varun/Desktop/WorkSpace/vscode/node_modules/vscode-sqlite3/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/nodejs/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.4.0-33-generic
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/varun/Desktop/WorkSpace/vscode/node_modules/vscode-sqlite3
gyp ERR! node -v v10.19.0
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok 

FYI: I am trying to build vscode source code in my ubuntu machine.

Even if the above method would have worked, I feel it still needs consideration, as we might trigger the build n number of times and we need to give the command every time.
Thank you.

What is the command that you are running??

@ryzokuken @targos Does the Python 3 error relate to nodejs/gyp-next#3?
Would python3 -m pip install gyp be a useful next step?

I was using yarn to build vscode. The build was failing as node-gyp rebuild command for a module(vscode-sqlite3) is failing.

I also tried building that specific module using node-gyp rebuild. But the build wis failing with the error stated in the above comments.

If you are using python2, you may need to link python with python2 (using ln command).

/bin/sh: 1: python: not found

Hi @gengjiawen , if you see 4 line of the output in the first comment, it says it found python. I also created an alias python for python2. It didn't work.

Hi, do we have any update here

Do you get identical results if you use node-gyp v7.0.0 and Python 3?

If yes, then please try python3 -m pip install gyp and then try again.

Please provide the ___exact___ commands that you are typing on the command line.

@cclauss we don't have gyp on PyPI. This should be python3 -m pip install gyp-next.

we don't have gyp on PyPI

Someone else (Chromium Authors) does.

@cclauss right. I'm not sure it's worth talking to the Google OSPO in order to manage to get access to that, but I could kick off an email thread if you feel too strongly about it.

Would it be possible to change node-gyp so that it doesn't fail when there are multiple python versions installed? Or at least that it gives a reasonable error message?

I run into problems with this module every 6 months or so and it always is super frustrating and difficult to find a solution (or the problem, in the first place). And I never even used this module directly but it's a dependency for every other module out there.

@Badestrand What is wrong with the suggestion at https://github.com/nodejs/node-gyp/issues/2144#issuecomment-636496546 ? Please provide the command that you are typing and a complete error log if that suggestion is not providing you with access to the Python of your choice.

Thank you @cclauss, that actually worked.

What I am getting at is that I always find it difficult to find the correct solution.

In the last few hours I had a variety of different error messages from node-gyp, by trying to install the pg-native module. The error messages were:

  • No module named ast
  • TypeError: write() argument must be str, not bytes while trying to load binding.gyp
  • gyp: Call to '/usr/bin/pg_config --libdir' returned exit status 1 while in binding.gyp. while trying to load binding.gyp (this one actually originated from a different module)

Googeling these errors took some hours and a lot of retries until I reached at this thread and discovered that I need to set NODE_GYP_FORCE_PYTHON. Inbetween there was something about upgrading node-gyp as well but couldn't find how to do it when it isn't even mentioned in the package-lock.json and not installed as global module. And as mentioned, I have errors like these from node-gyp every half year or so and on different projects.

If the Python version issue is the source of a significant portion of build fails for people then it would be a huge help if this module could test for that and display a nice error message (instead of failing with one of the ones above) or even just set NODE_GYP_FORCE_PYTHON itself so it doesn't even fail.

No module named ast

Difficult to understand because ast is a builtin Standard Library module in both Python 2 and Python 3.

TypeError: write() argument must be str, not bytes while trying to load binding.gyp

This is Python 3 ensuring that the file mode and write contents are matching data type.
Knowing the command typed, node-gyp version, and the complete error log would help us spot and fix this issue.

If the Python version issue is the source of a significant portion of build fails...

Python 2 died on 1/1/2020 so Node.js and node-gyp should drop support for legacy Python as discussed in #2093.

Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch. E:\Zoop\zoop-product-v0\src\node_modules\x509\build\x509.vcxproj(21,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk. gyp ERR! build error gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Users\jabba\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:314:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12) gyp ERR! System Windows_NT 10.0.19041 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\jabba\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd E:\Zoop\zoop-product-v0\src\node_modules\x509

Getting this any idea
node : 14
python 3.8

npm config file

userconfig C:\Usersjabba.npmrc
"msbuild_path = "C:\Program\"=Files"
GYP_MSVS_VERSION = "2017"
msbuild_ = "path"
msbuild_path = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe"
msvs_version = "2019"
node_gyp = "C:\Users\jabba\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js"
python = "python2.7"

; globalconfig C:\Usersjabba\AppData\Roaming\npm\etc\npmrc

; builtin config undefined
prefix = "C:\Users\jabba\AppData\Roaming\npm"

@jabbar86 Your output above contains both python 3.8 AND python = "python2.7". Perhaps ___force___ the usage of Python 3 throughout the process by following the instructions at https://github.com/nodejs/node-gyp#configuring-python-dependency

@cclauss No luck I think Python is not an issue. here is a full log

gyp info it worked if it ends with ok gyp info using [email protected] gyp info using [email protected] | win32 | x64 gyp info find Python using Python version 3.8.5 found at "C:\Python38\python.exe" gyp info find VS using VS2019 (16.7.30523.141) found at: gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" gyp info find VS run with --verbose for detailed information gyp info spawn C:\Python38\python.exe gyp info spawn args [ gyp info spawn args 'C:\\Users\\jabba\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'msvs', gyp info spawn args '-I', gyp info spawn args 'E:\\Zoop\\zoop-product-v0\\src\\node_modules\\node-expat\\build\\config.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\\Users\\jabba\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\\Users\\jabba\\AppData\\Local\\node-gyp\\Cache\\14.9.0\\include\\node\\common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=C:\\Users\\jabba\\AppData\\Local\\node-gyp\\Cache\\14.9.0', gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\jabba\\AppData\\Roaming\\npm\\node_modules\\node-gyp', gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\jabba\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\14.9.0\\\\<(target_arch)\\\\node.lib', gyp info spawn args '-Dmodule_root_dir=E:\\Zoop\\zoop-product-v0\\src\\node_modules\\node-expat', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'E:\\Zoop\\zoop-product-v0\\src\\node_modules\\node-expat\\build', gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] Warning: Missing input files: E:\Zoop\zoop-product-v0\src\node_modules\node-expat\build\deps\libexpat\..\..\..\deps\libexpat\version.c gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe gyp info spawn args [ gyp info spawn args 'build/binding.sln', gyp info spawn args '/clp:Verbosity=minimal', gyp info spawn args '/nologo', gyp info spawn args '/p:Configuration=Release;Platform=x64' gyp info spawn args ] Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch. E:\Zoop\zoop-product-v0\src\node_modules\node-expat\build\deps\libexpat\expat.vcxproj(21,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.gyp ERR! build error gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Users\jabba\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:194:23)gyp ERR! stack at ChildProcess.emit (events.js:314:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12) gyp ERR! System Windows_NT 10.0.19041 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\jabba\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd E:\Zoop\zoop-product-v0\src\node_modules\node-expat

It seems from the log that MSBuild.exe is failing, and gyp is just bubbling up the error.

Hey @ryzokuken I have update the env variables now getting this error

```
NPM CONFIG

metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/6.14.8 node/v14.9.0 win32 x64"

; userconfig C:\Usersjabba.npmrc
"msbuild_path = "C:\Program\"=Files"
GYP_MSVS_VERSION = "2017"
msbuild_ = "path"
msbuild_path = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe"
msvs_version = "2019"
node_gyp = "C:\Users\jabba\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js"
python = "C:\Python38\"

; globalconfig C:\Usersjabba\AppData\Roaming\npm\etc\npmrc

; builtin config undefined
prefix = "C:\Users\jabba\AppData\Roaming\npm"

; node bin location = C:\Program Files\nodejs\node.exe

ERROR:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info find Python using Python version 3.8.5 found at "C:\Python38python.exe"
gyp info find VS using VS2019 (16.7.30523.141) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Python38python.exe
gyp info spawn args [
gyp info spawn args 'C:\Users\jabba\AppData\Roaming\npm\node_modules\node-gyp\gyp\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-I',
gyp info spawn args 'E:\Zoop\zoop-product-v0\src\node_modules\x509\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\jabba\AppData\Roaming\npm\node_modules\node-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\jabba\AppData\Local\node-gyp\Cache\14.9.0\include\node\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\Users\jabba\AppData\Local\node-gyp\Cache\14.9.0',
gyp info spawn args '-Dnode_gyp_dir=C:\Users\jabba\AppData\Roaming\npm\node_modules\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\jabba\\AppData\\Local\\node-gyp\\Cache\\14.9.0\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=E:\Zoop\zoop-product-v0\src\node_modules\x509',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'E:\Zoop\zoop-product-v0\src\node_modules\x509\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\BinMSBuild.exe
gyp info spawn args [
gyp info spawn args 'build/binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64'
gyp info spawn args ]
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
addon.cc
x509.cc
win_delay_load_hook.cc
E:\Zoop\zoop-product-v0\src\node_modules\x509\node_modules\nan\nan_converters_43_inl.h(22,1): error C2664: 'v8::Local v8::Value::ToBoolean(v8::Isolate *) const': cannot convert argument 1 from 'v8::Local' to 'v8::Isolate *' (compiling source file ..\src\addon.cc) [E:\Zoop\zoop-product-v0\src\node_modules\x509\build\x509.vcxproj]
E:\Zoop\zoop-product-v0\src\node_modules\x509\node_modules\nan\nan_converters_43_inl.h(22,1): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called (compiling source file ..\src\addon.cc) [E:\Zoop\zoop-product-v0\src\node_modules\x509\build\x509.vcxproj]
C:\Usersjabba\AppData\Local\node-gyp\Cache\14.9.0\include\node\v8.h(2848,18): message : see declaration of 'v8::Value::ToBoolean' (compiling source file ..\src\addon.cc) [E:\Zoop\zoop-product-v0\src\node_modules\x509\build\x509.vcxproj]
E:\Zoop\zoop-product-v0\src\node_modules\x509\node_modules\nan\nan_converters_43_inl.h(40,1): error C2664: 'bool v8::Value::BooleanValue(v8::Isolate *) const': cannot convert argument 1 from 'v8::Local' to 'v8::Isolate *' (compiling source file ..\src\addon.cc) [E:\Zoop\zoop-product-v0\src\node_modules\x509\build\x509.vcxproj]
E:\Zoop\zoop-product-v0\src\node_modules\x509\node_modules\nan\nan_converters_43_inl.h(40,1): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called (compiling source file ..\src\addon.cc) [E:\Zoop\zoop-product-v0\src\node_modules\x509\build\x509.vcxproj]
C:\Usersjabba\AppData\Local\node-gyp\Cache\14.9.0\include\node\v8.h(2858,8): message : see declaration of 'v8::Value::BooleanValue' (compiling source file ..\src\addon.cc) [E:\Zoop\zoop-product-v0\src\node_modules\x509\build\x509.vcxproj]
E:\Zoop\zoop-product-v0\src\node_modules\x509\node_modules\nan\nan_implementation_12_inl.h(356,37): error C2660: 'v8::StringObject::New': function does not take 1 arguments (compiling source file ..\src\addon.cc) [E:\Zoop\zoop-product-v0\src\node_modules\x509\build\x509.vcxproj]
C:\Usersjabba\AppData\Local\node-gyp\Cache\14.9.0\include\node\v8.h(5847,23): message : see declaration of 'v8::StringObject::New' (compiling source file ..\src\addon.cc) [E:\Zoop\zoop-product-v0\src\node_modules\x509\build\x509.vcxproj]
E:\Zoop\zoop-product-v0\src\node_modules\x509\node_modules\nan\nan_implementation_12_inl.h(356,60): error C2059: syntax error: ')' (compiling source file ..\src\addon.cc) [E:\Zoop\zoop-product-v0\src\node_modules\x509\build\x509.vcxproj]
E:\Zoop\zoop-product-v0\src\node_modules\x509\node_modules\nan\nan_object_wrap.h(24,5): error C2039: 'IsNearDeath': is not a member of 'Nan::Persistent>' [E:\Zoop\zoop-product-v0\src\node_modules\x509\build\x509.vcxproj]
with
[
T=v8::Object
] (compiling source file ..\src\addon.cc)
E:\Zoop\zoop-product-v0\src\node_modules\x509\node_modules\nan\nan.h(1904): message : see declaration of 'Nan::Persistent>' [E:\Zoop\zoop-product-v0\src\node_modules\x509\build\x509.vcxproj]
with
[
T=v8::Object
] (compiling source file ..\src\addon.cc)```

This works for me :)

npm install -g node-gyp

export npm_config_node_gyp=/usr/local/lib/node_modules/node-gyp/bin/node-gyp.js

rm -rf node_modules(if already there)

npm install

Yeah, the previous was an error in a specific version of nan.

P.S. can someone with triage access please close this?

Was this page helpful?
0 / 5 - 0 ratings