wechaty / puppet-padlocal

Puppet PadLocal is a Pad Protocol for WeChat
https://wechaty.js.org/docs/puppet-providers/padlocal
Apache License 2.0
642 stars 88 forks source link

Node.js 14.15.4安装wechaty-puppet-padlocal@latest出错 #42

Closed lorsque-sir closed 3 years ago

lorsque-sir commented 3 years ago

gyp ERR! find VS gyp ERR! find VS msvs_version not set from command line or npm config gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer gyp ERR! find VS looking for Visual Studio 2015 gyp ERR! find VS - not found gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 gyp ERR! find VS gyp ERR! find VS ** gyp ERR! find VS You need to install the latest version of Visual Studio gyp ERR! find VS including the "Desktop development with C++" workload. gyp ERR! find VS For more information consult the documentation at: gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows gyp ERR! find VS ** gyp ERR! find VS gyp ERR! configure error gyp ERR! stack Error: Could not find any Visual Studio installation to use gyp ERR! stack at VisualStudioFinder.fail (D:\Node.js\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47) gyp ERR! stack at D:\Node.js\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16 gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (D:\Node.js\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14) gyp ERR! stack at D:\Node.js\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14 gyp ERR! stack at D:\Node.js\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16 gyp ERR! stack at D:\Node.js\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7 gyp ERR! stack at D:\Node.js\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16 gyp ERR! stack at ChildProcess.exithandler (child_process.js:315:5) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at maybeClose (internal/child_process.js:1048:16) gyp ERR! System Windows_NT 10.0.19042 gyp ERR! command "D:\Node.js\node.exe" "D:\Node.js\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release" gyp ERR! cwd C:\Users\lorsque\node_modules\better-sqlite3 gyp ERR! node -v v14.15.4 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! better-sqlite3@7.1.2 build-release: node-gyp rebuild --release npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the better-sqlite3@7.1.2 build-release script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

renph commented 3 years ago

这个错误是因为better-sqlite3无法在Windows下完成编译。你需要重新安装Windows-Build-Tools,见https://www.npmjs.com/package/windows-build-tools

wenzai007 commented 3 years ago

重新安装了build tool 仍然收到下面的error

\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild --release ) Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framew ork 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it i s installed elsewhere. [D:\Working\Github\tryusepadlocalpuppet\node_modules\better-sqlite3\build\binding.sln] gyp ERR! build error gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12) gyp ERR! System Windows_NT 10.0.19042 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release" gyp ERR! cwd D:\Working\Github\tryusepadlocalpuppet\node_modules\better-sqlite3 gyp ERR! node -v v10.13.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! better-sqlite3@7.1.2 build-release: node-gyp rebuild --release npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the better-sqlite3@7.1.2 build-release 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\wenzzha\AppData\Roaming\npm-cache_logs\2021-02-13T12_25_58_261Z-debug.log npm WARN ws@7.4.3 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself. npm WARN ws@7.4.3 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself. npm WARN tryusepadlocalpuppet@1.0.0 No description npm WARN tryusepadlocalpuppet@1.0.0 No repository field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! better-sqlite3@7.1.2 install: prebuild-install || npm run build-release npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the better-sqlite3@7.1.2 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\wenzzha\AppData\Roaming\npm-cache_logs\2021-02-13T12_25_58_530Z-debug.log

wenzai007 commented 3 years ago

重新安装了build tool 仍然收到下面的error

\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild --release ) Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framew ork 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it i s installed elsewhere. [D:\Working\Github\tryusepadlocalpuppet\node_modules\better-sqlite3\build\binding.sln] gyp ERR! build error gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12) gyp ERR! System Windows_NT 10.0.19042 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release" gyp ERR! cwd D:\Working\Github\tryusepadlocalpuppet\node_modules\better-sqlite3 gyp ERR! node -v v10.13.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! better-sqlite3@7.1.2 build-release: node-gyp rebuild --release npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the better-sqlite3@7.1.2 build-release 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\wenzzha\AppData\Roaming\npm-cache_logs\2021-02-13T12_25_58_261Z-debug.log npm WARN ws@7.4.3 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself. npm WARN ws@7.4.3 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself. npm WARN tryusepadlocalpuppet@1.0.0 No description npm WARN tryusepadlocalpuppet@1.0.0 No repository field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! better-sqlite3@7.1.2 install: prebuild-install || npm run build-release npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the better-sqlite3@7.1.2 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\wenzzha\AppData\Roaming\npm-cache_logs\2021-02-13T12_25_58_530Z-debug.log

感觉现在的版本限制比较多, windows下搭建环境可能会有一些问题,一直被block住,后来转到macbook 用node14版本 重新拉依赖, 解决了问题,现已跑通demo, 还是建议按照readme里面提到的环境去配置 最好用mac os

padlocal commented 3 years ago

等手头一些棘手问题解决后会回头修复不同平台兼容性等问题,目前还请大家包容一下。🙏