When I run
npm install -g ffi -verbose
it raises error, and log suggests node-gyp version is 8.2.0:
...
npm ERR! D:\Programs\NodeJS\node_global_modules\node_modules\ffi\node_modules\ref\src\binding.cc(644,8): warning C4996: 'Nan::ForceSet': ������Ϊ�ѷ�� [D:\Programs\NodeJS\node_global_modules\node_modules\ffi\node_modules\ref\build\binding.vcxproj]
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.2.0
npm ERR! gyp info using node@16.13.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.8.8 found at "D:\Programs\Anaconda3\python.exe"
npm ERR! gyp info find VS using VS2019 (16.10.31515.178) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn D:\Programs\Anaconda3\python.exe
...
This is different from what I see when running node-gyp -v
:
C:\Users\Administrator>node-gyp -v
v8.4.1
and could possibly explain why it uses python 3.8 and MSVC 2019 even though I have already run:
npm config set python python2.7
npm config set msvs_version 2015
I don't know why there is another node-gyp on my PC, and how to use the proper version.