- Node Version:
$ node -v
v8.11.3
$ npm -v
6.5.0
- Platform: Windows 10 Pro
- Compiler: msbuild
- Module: weak
Verbose output (from npm or node-gyp):
$ npm i --verbose
npm info it worked if it ends with ok
npm verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
npm verb cli 'C:\\Users\\christian.fornara\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
npm verb cli 'i',
npm verb cli '--verbose' ]
npm info using npm@6.5.0
npm info using node@v8.11.3
npm verb npm-session 72619d7d01e6525a
npm info lifecycle AutoAuthWifiClearpass@0.0.1~preinstall: AutoAuthWifiClearpass@0.0.1
npm timing stage:loadCurrentTree Completed in 612ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 6ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 244ms
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 241ms
npm timing stage:loadIdealTree Completed in 572ms
npm timing stage:generateActionsToTake Completed in 59ms
npm verb correctMkdir C:\Users\christian.fornara\AppData\Roaming\npm-cache\_locks correctMkdir not in flight; initializing
npm timing audit compress Completed in 8ms
npm info audit Submitting payload of 12000bytes
npm verb lock using C:\Users\christian.fornara\AppData\Roaming\npm-cache\_locks\staging-7568c44e56040492.lock for E:\Progetti\AutoAuthWifiClearpass\node_modules\.staging
npm timing action:extract Completed in 77ms
npm timing action:finalize Completed in 12ms
npm timing action:refresh-package-json Completed in 137ms
npm info lifecycle file-uri-to-path@1.0.0~preinstall: file-uri-to-path@1.0.0
npm info lifecycle bindings@1.5.0~preinstall: bindings@1.5.0
npm info lifecycle weak@1.0.1~preinstall: weak@1.0.1
npm timing action:preinstall Completed in 3ms
npm info linkStuff file-uri-to-path@1.0.0
npm info linkStuff bindings@1.5.0
npm info linkStuff weak@1.0.1
npm timing action:build Completed in 5ms
npm info lifecycle file-uri-to-path@1.0.0~install: file-uri-to-path@1.0.0
npm info lifecycle bindings@1.5.0~install: bindings@1.5.0
npm info lifecycle weak@1.0.1~install: weak@1.0.1
> weak@1.0.1 install E:\Progetti\AutoAuthWifiClearpass\node_modules\weak
> node-gyp rebuild
E:\Progetti\AutoAuthWifiClearpass\node_modules\weak>if not defined npm_config_node_gyp (node "C:\Users\christian.fornara\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\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli 'C:\\Users\\christian.fornara\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli 'rebuild' ]
gyp info using node-gyp@3.8.0
gyp info using node@8.11.3 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "C:Userschristian.fornara.windows-build-toolspython27" in the PATH
gyp verb `which` failed Error: not found: C:Userschristian.fornara.windows-build-toolspython27
gyp verb `which` failed at getNotFoundError (C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:80:29)
gyp verb `which` failed at C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:89:16
gyp verb `which` failed at C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\isexe\index.js:42:5
gyp verb `which` failed at C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed C:Userschristian.fornara.windows-build-toolspython27 { Error: not found: C:Userschristian.fornara.windows-build-toolspython27
gyp verb `which` failed at getNotFoundError (C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:80:29)
gyp verb `which` failed at C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:89:16
gyp verb `which` failed at C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\isexe\index.js:42:5
gyp verb `which` failed at C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed stack: 'Error: not found: C:Userschristian.fornara.windows-build-toolspython27\n at getNotFoundError (C:\\Users\\christian.fornara\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\which\\which.js:13:12)\n at F (C:\\Users\\christian.fornara\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\which\\which.js:68:19)\n at E (C:\\Users\\christian.fornara\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\which\\which.js:80:29)\n at C:\\Users\\christian.fornara\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\which\\which.js:89:16\n at C:\\Users\\christian.fornara\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\isexe\\index.js:42:5\n at C:\\Users\\christian.fornara\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\isexe\\windows.js:36:5\n at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb `which` failed code: 'ENOENT' }
gyp verb could not find "C:Userschristian.fornara.windows-build-toolspython27". checking python launcher
gyp verb check python launcher python executable found: "C:\\Users\\christian.fornara\\.windows-build-tools\\python27\\python.exe"
gyp verb check python version `C:\Users\christian.fornara\.windows-build-tools\python27\python.exe -c "import sys; print "2.7.15
gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
gyp verb get node dir no --target version specified, falling back to host node version: 8.11.3
gyp verb command install [ '8.11.3' ]
gyp verb install input version string "8.11.3"
gyp verb install installing version: 8.11.3
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 8.11.3
gyp verb build dir attempting to create "build" dir: E:\Progetti\AutoAuthWifiClearpass\node_modules\weak\build
gyp verb build dir "build" dir needed to be created? E:\Progetti\AutoAuthWifiClearpass\node_modules\weak\build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: E:\Progetti\AutoAuthWifiClearpass\node_modules\weak\build\config.gypi
gyp verb config.gypi checking for gypi file: E:\Progetti\AutoAuthWifiClearpass\node_modules\weak\config.gypi
gyp verb common.gypi checking for gypi file: E:\Progetti\AutoAuthWifiClearpass\node_modules\weak\common.gypi
gyp verb gyp gyp format was not specified; forcing "msvs"
gyp info spawn C:\Users\christian.fornara\.windows-build-tools\python27\python.exe
gyp info spawn args [ 'C:\\Users\\christian.fornara\\AppData\\Roaming\\npm\\node_modules\\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 '-G',
gyp info spawn args 'msvs_version=2019',
gyp info spawn args '-I',
gyp info spawn args 'E:\\Progetti\\AutoAuthWifiClearpass\\node_modules\\weak\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\christian.fornara\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\christian.fornara\\.node-gyp\\8.11.3\\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\\christian.fornara\\.node-gyp\\8.11.3',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\christian.fornara\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\christian.fornara\\.node-gyp\\8.11.3\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=E:\\Progetti\\AutoAuthWifiClearpass\\node_modules\\weak',
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:\\Progetti\\AutoAuthWifiClearpass\\node_modules\\weak\\build',
gyp info spawn args '-Goutput_dir=.' ]
Traceback (most recent call last):
File "C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16, in <module>
sys.exit(gyp.script_main())
File "C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 545, in script_main
return main(sys.argv[1:])
File "C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 538, in main
return gyp_main(args)
File "C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 514, in gyp_main
options.duplicate_basename_check)
File "C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 98, in Load
generator.CalculateVariables(default_variables, params)
File "C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1916, in CalculateVariables
generator_flags.get('msvs_version', 'auto'))
File "C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 434, in SelectVisualStudioVersion
versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
KeyError: '2019'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:345:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\christian.fornara\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd E:\Progetti\AutoAuthWifiClearpass\node_modules\weak
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm verb lifecycle weak@1.0.1~install: unsafe-perm in lifecycle true
npm verb lifecycle weak@1.0.1~install: PATH: C:\Users\christian.fornara\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\Progetti\AutoAuthWifiClearpass\node_modules\weak\node_modules\.bin;E:\Progetti\AutoAuthWifiClearpass\node_modules\.bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\christian.fornara\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\nodejs;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Sennheiser\SoftphoneSDK;C:\Program Files\MySQL\MySQL Utilities 1.6;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Users\christian.fornara\AppData\Local\Microsoft\WindowsApps;C:\Users\christian.fornara\AppData\Local\Programs\Microsoft VS Code\bin
npm verb lifecycle weak@1.0.1~install: CWD: E:\Progetti\AutoAuthWifiClearpass\node_modules\weak
npm timing audit submit Completed in 805ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 483ms
npm timing audit body Completed in 1ms
npm info lifecycle weak@1.0.1~install: Failed to exec install script
npm timing action:install Completed in 1519ms
npm timing action:postinstall Completed in 0ms
npm verb unlock done using C:\Users\christian.fornara\AppData\Roaming\npm-cache\_locks\staging-7568c44e56040492.lock for E:\Progetti\AutoAuthWifiClearpass\node_modules\.staging
npm timing stage:executeActions Completed in 2236ms
npm timing stage:rollbackFailedOptional Completed in 33ms
npm info linkStuff AutoAuthWifiClearpass@0.0.1
npm info lifecycle AutoAuthWifiClearpass@0.0.1~install: AutoAuthWifiClearpass@0.0.1
npm info lifecycle AutoAuthWifiClearpass@0.0.1~postinstall: AutoAuthWifiClearpass@0.0.1
npm info lifecycle AutoAuthWifiClearpass@0.0.1~prepublish: AutoAuthWifiClearpass@0.0.1
npm info lifecycle AutoAuthWifiClearpass@0.0.1~prepare: AutoAuthWifiClearpass@0.0.1
npm timing stage:runTopLevelLifecycles Completed in 3640ms
npm verb saving []
npm verb shrinkwrap skipping write for package.json because there were no changes.
npm info lifecycle undefined~preshrinkwrap: undefined
npm info lifecycle undefined~shrinkwrap: undefined
npm verb shrinkwrap skipping write for package-lock.json because there were no changes.
npm info lifecycle undefined~postshrinkwrap: undefined
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: weak@1.0.1 (node_modules\weak):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: weak@1.0.1 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm verb optional SKIPPING OPTIONAL DEPENDENCY:
npm verb optional Failed at the weak@1.0.1 install script.
npm verb optional SKIPPING OPTIONAL DEPENDENCY: This is probably not a problem with npm. There is likely additional logging output above.
audited 546 packages in 3.839s
found 18 vulnerabilities (7 low, 5 moderate, 6 high)
run `npm audit fix` to fix them, or `npm audit` for details
npm verb exit [ 0, true ]
npm timing npm Completed in 4573ms
npm info ok
Hello,
thanks for the fast reply.
Now i have : $ node -v v12.14.1
but the problem is the same…
Verbose output (from npm or node-gyp):
@spartaelcid you seem to have installed npm manually, so you also need to update it:
The npm you are using now has node-gyp 3.8.0, which does not support Visual Studio 2019.
Having the same problem when trying to upgrade nodejs version from v10.15.3 to 12.14.1 (CentOS)
When I downgrade to v10.15.3 it’s working again gcc-c++ make are up to date.
I got the workaround for this error, you have to install Xcode to Xcode command line. read full steps here Error solving steps
If it helps, i was missing the “make” and “g++” packages (
apt install make g++
)I also got around this by downgrading from node 13 or so to a node 10 version using nvm. I had to redownload a repository because I’d made a mess of one locally trying to do different things with npm install and ng update with the --force option. Anyways, as has been said, try changing your node version if you encounter this it seems.
gyp info using node-gyp@3.8.0
is the problem. What version ofnode-gyp
does your log say? There can be multiple versions ofnode-gyp
installed but it is the one written in the log that is important. How do things change after runningnpm install -g npm
?