enilu/web-flash

admin后台版本在npm出现异常

tangguo0039 opened this issue · 5 comments

描述问题
简洁有效的说明

npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to
100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.

npm ERR! code 1
npm ERR! path D:\flash-vue-admin\node_modules\deasync
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@16.14.2 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.4 found at "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\python.exe"
npm ERR! gyp http GET https://nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v16.14.2/SHASUMS256.txt
npm ERR! gyp http GET https://nodejs.org/download/release/v16.14.2/win-arm64/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v16.14.2/win-x86/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v16.14.2/win-x64/node.lib
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.14.2/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.14.2/win-x64/node.lib
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.14.2/win-x86/node.lib
npm ERR! gyp http 404 https://nodejs.org/download/release/v16.14.2/win-arm64/node.lib
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack at D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
npm ERR! gyp ERR! stack at D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack at D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:406:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:526:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd D:\flash-vue-admin\node_modules\deasync
npm ERR! gyp ERR! node -v v16.14.2
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Local\npm-cache_logs\2022-04-25T08_25_47_210Z-debug-0.log

如何重现问题
把你遇到问题发生的步骤替换掉下面的内容

  1. 安装的npm版本
    C:>node -v
    v16.14.2
    C:>n

请问是要将的 node 的版本降低吗?

你好,我对前端并不熟悉。请问是要降低node版本吗?如果是降低node版本请求用那个版本合适一些

你好,你的邮件我已经收到了。

你好可以解决这个vue 版本问题吗

版本降低2个版本,能打包成功。但是16版本这里有一句 性能提升问题。
npm WARN deprecated core-js@2.6.12: core-js@<3.4 不再维护,由于问题数量不推荐使用。由于 V8 引擎的奇思妙想,旧 core-js 版本中的功能检测可能会导致速度下降高达
100 倍,即使没有填充任何内容。请将您的依赖项升级到 core-js 的实际版本。

作者您有前端知识普及一下吗? 还有H5版本 访问的时候有modile路径这个怎么去除掉呢?这个modile影响h5端图片访问

enilu commented

本地测试过下面两个版本,供参考:
14.15.0
10.16.0