Binaryify / vue-qr

The Vue Component for Awesome-qr.js
MIT License
848 stars 121 forks source link

新版本跑不起来项目了 #111

Closed coolicer closed 2 years ago

coolicer commented 2 years ago

我看了canvas升级2.9.0,然后跑不起来了。

Binaryify commented 2 years ago

报什么错了

coolicer commented 2 years ago

@Binaryify 报vue-qr没有安装,叫你用npm安装

Binaryify commented 2 years ago

重装vue-qr呢

coolicer commented 2 years ago

不行,我感觉是因为canvas版本。我另起了一新项目,只引vue-qr,报一样的错。

coolicer commented 2 years ago

我的解决方案是,把版本限定在你上一个版本。

Binaryify commented 2 years ago

我这边无法重现

Binaryify commented 2 years ago

image

edifierx666 commented 2 years ago

你特么的3.2.3版本dist文件夹咋没了

Binaryify commented 2 years ago

@edifierx666 知道了知道,我新电脑没dist,只测试了vue3直接引用文件夹的方式,刚刚重新发布了,你们更新到v3.2.4就好了

coolicer commented 2 years ago

我用vue2,没有用vue3

Binaryify commented 2 years ago

@coolicer 装下v3.2.4

coolicer commented 2 years ago

@Binaryify 给你死心吧

error D:\workspace\hello-canvas\node_modules\canvas: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments:
Directory: D:\workspace\hello-canvas\node_modules\canvas
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@1.0.8
node-pre-gyp info using node@14.16.1 | win32 | x64
node-pre-gyp info check checked for "D:\workspace\hello-canvas\node_modules\canvas\build\Release\canvas.node" (not found)
node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.9.0/canvas-v2.9.0-node-v83-win32-unknown-x64.tar.gz
node-pre-gyp ERR! install request to https://github.com/Automattic/node-canvas/releases/download/v2.9.0/canvas-v2.9.0-node-v83-win32-unknown-x64.tar.gz failed, reason: connect ETIMEDOUT 20.205.243.166:443
node-pre-gyp WARN Pre-built binaries not installable for canvas@2.9.0 and node@14.16.1 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error request to https://github.com/Automattic/node-canvas/releases/download/v2.9.0/canvas-v2.9.0-node-v83-win32-unknown-x64.tar.gz failed, reason: connect ETIMEDOUT 20.205.243.166:443

D:\workspace\hello-canvas\node_modules\canvas>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" clean )  else (node "" clean )
gyp info it worked if it ends with ok
gyp info using node-gyp@5.1.0
gyp info using node@14.16.1 | win32 | x64
gyp info ok

D:\workspace\hello-canvas\node_modules\canvas>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build --module=D:\workspace\hello-canvas\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=D:\workspace\hello-canvas\node_modules\canvas\build\Release --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83 )  else (node "" configure --fallback-to-build --module=D:\workspace\hello-canvas\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=D:\workspace\hello-canvas\node_modules\canvas\build\Release --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83 )
gyp info it worked if it ends with ok
gyp info using node-gyp@5.1.0
gyp info using node@14.16.1 | win32 | x64
gyp info find Python using Python version 3.9.6 found at "C:\Users\eep\AppData\Local\Programs\Python\Python39\python.exe"
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 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at C:\Program Files\nodejs\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.19043
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" 
"--fallback-to-build" "--module=D:\\workspace\\hello-canvas\\node_modules\\canvas\\build\\Release\\canvas.node" "--module_name=canvas" "--module_path=D:\\workspace\\hello-canvas\\node_modules\\canvas\\build\\Release" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"gyp ERR! cwd D:\workspace\hello-canvas\node_modules\canvas
gyp ERR! node -v v14.16.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=D:\workspace\hello-canvas\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=D:\workspace\hello-canvas\node_modules\canvas\build\Release --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (D:\workspace\hello-canvas\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Windows_NT 10.0.19043
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\workspace\\hello-canvas\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd D:\workspace\hello-canvas\node_modules\canvas
node-pre-gyp ERR! node -v v14.16.1
node-pre-gyp ERR! node-pre-gyp -v v1.0.8
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=D:\workspace\hello-canvas\node_modules\canvas\build\Release\canvas.node --module_name
coolicer commented 2 years ago

在windows下安装编译不通过,搞了半天你都没看到我开头说的,canvas影响到了。反正我指定3.2.2是可以的,我暂时先用这个。

Binaryify commented 2 years ago

你确定老版本能装上不是你缓存问题?不是环境问题是什么 image

image

coolicer commented 2 years ago

单安装canvas我也可以,你可以找台windows试试,是哪个地方影响

Binaryify commented 2 years ago

image 我这个也是windows

wyfweb1 commented 2 years ago

怎么就close了,我的指定3.2.2都跑不起来,现在指定2.5.0才能跑起来

Binaryify commented 2 years ago

@wyfweb1 node-canvas 本来就安装比较麻烦,你去node-canvas那边提issue https://github.com/Automattic/node-canvas/wiki/Installation:-Windows

Binaryify commented 2 years ago

新版本已经移除canvas的依赖了,现在安装应该没啥阻碍了