- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想运行这个项目:https://github.com/adonis-china/adonis-adminify
当我运行npm install
时,存在错误:
> sqlite3@3.1.13 install C:\laragon\www\adonis-admin\node_modules\sqlite3
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v64-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.13 and node@10.15.0 (node-v64 ABI) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v64-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.13 and node@10.15.0 (node-v64 ABI) (falling back to source compile with node-gyp)
gyp ERR! gypfind VS
gyp ERR!ERR! find VSfind VS
msvs_version not set from command line or npm config
gypgyp ERR!ERR! find VSfind VS msvs_version not set from command line or npm config
VCINSTALLDIR not set, not running in VS Command Prompt
gyp gypERR! ERR! find VSfind VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp checking VS2019 (16.2.29230.47) found at:
gypERR! find VSERR! checking VS2019 (16.2.29230.47) found at:
gyp find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional"
ERR!gyp find VS ERR! "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional"
gypfind VS ERR! - "Visual Studio C++ core features" missing
gyp ERR!find VS - "Visual Studio C++ core features" missing
find VSgyp could not find a version of Visual Studio 2017 or newer to use
gypERR! ERR!find VS could not find a version of Visual Studio 2017 or newer to use
find VS looking for Visual Studio 2015
gyp gyp ERR!ERR! find VSfind VS looking for Visual Studio 2015
- not found
gyp gyp ERR!ERR! find VSfind VS - not found
not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR!gyp ERR!find VS find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp gypERR! ERR!find VS
gypfind VS **************************************************************
gypERR! ERR!find VS find VS **************************************************************
You need to install the latest version of Visual Studio
gypgyp ERR! ERR!find VS find VS You need to install the latest version of Visual Studio
including the "Desktop development with C++" workload.
gypgyp ERR!ERR! find VS find VS including the "Desktop development with C++" workload.
For more information consult the documentation at:
gyp ERR!gyp find VS For more information consult the documentation at:
ERR!gyp ERR! find VSfind VS https://github.com/nodejs/node-gyp#on-windows
https://github.com/nodejs/node-gyp#on-windows
gyp gyp ERR!ERR! find VS **************************************************************
find VSgyp **************************************************************
gypERR! find VS
ERR! find VS
gyp gypERR! ERR!configure error
configure errorgyp
ERR! stackgyp Error: Could not find any Visual Studio installation to use
gypERR! stackERR! Error: Could not find any Visual Studio installation to use
stackgyp at VisualStudioFinder.fail (C:\Users\Chelsea\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
ERR!gyp stack at VisualStudioFinder.fail (C:\Users\Chelsea\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
ERR! gypstack at findVisualStudio2013 (C:\Users\Chelsea\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16)
gypERR! ERR!stack at findVisualStudio2013 (C:\Users\Chelsea\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16)
stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\Chelsea\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:344:14)
gypgyp ERR! stack at findVisualStudio2015 (C:\Users\Chelsea\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14)
gypERR! ERR! stackstack at regSearchKeys (C:\Users\Chelsea\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:365:16)
at VisualStudioFinder.findVisualStudio2013 (C:\Users\Chelsea\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:344:14)
gyp gypERR! ERR!stack stack at regGetValue (C:\Users\Chelsea\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7)
at findVisualStudio2015 (C:\Users\Chelsea\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14)
gypgyp ERR!ERR! stackstack at C:\Users\Chelsea\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp at regSearchKeys (C:\Users\Chelsea\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:365:16)
gyp ERR! ERR!stack at ChildProcess.exithandler (child_process.js:301:5)
gypstack at regGetValue (C:\Users\Chelsea\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7)
ERR! gypstack at ChildProcess.emit (events.js:182:13)
gypERR! ERR! stack at C:\Users\Chelsea\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
stack at maybeClose (internal/child_process.js:962:16)
gyp gypERR! ERR! System Windows_NT 10.0.17134
stackgyp at ChildProcess.exithandler (child_process.js:301:5)
ERR!gyp commandERR! "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Chelsea\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\laragon\\www\\adonis-admin\\node_modules\\sqlite3\\lib\\binding\\node-v64-win32-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\\laragon\\www\\adonis-admin\\node_modules\\sqlite3\\lib\\binding\\node-v64-win32-x64" "--python=C:\\Users\\Chelsea\\.windows-build-tools\\python27\\python.exe"
gypstack at ChildProcess.emit (events.js:182:13)
gypERR! ERR!cwd C:\laragon\www\adonis-admin\node_modules\sqlite3
gypstack ERR! at maybeClose (internal/child_process.js:962:16)
node -v v10.15.0
gypgyp ERR!ERR! Systemnode-gyp -v Windows_NT 10.0.17134
v5.0.3
gypgyp ERR!ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Chelsea\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\laragon\\www\\adonis-admin\\node_modules\\sqlite3\\lib\\binding\\node-v64-win32-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\\laragon\\www\\adonis-admin\\node_modules\\sqlite3\\lib\\binding\\node-v64-win32-x64" "--python=C:\\Users\\Chelsea\\.windows-build-tools\\python27\\python.exe"
not okgyp
ERR! cwd C:\laragon\www\adonis-admin\node_modules\sqlite3
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Chelsea\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\laragon\www\adonis-admin\node_modules\sqlite3\lib\binding\node-v64-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\laragon\www\adonis-admin\node_modules\sqlite3\lib\binding\node-v64-win32-x64 --python=C:\Users\Chelsea\.windows-build-tools\python27\python.exe' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\laragon\www\adonis-admin\node_modules\sqlite3\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:962:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\laragon\\www\\adonis-admin\\node_modules\\sqlite3\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\laragon\www\adonis-admin\node_modules\sqlite3
node-pre-gyp ERR! node -v v10.15.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.38
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Chelsea\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\laragon\www\adonis-admin\node_modules\sqlite3\lib\binding\node-v64-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\laragon\www\adonis-admin\node_modules\sqlite3\lib\binding\node-v64-win32-x64 --python=C:\Users\Chelsea\.windows-build-tools\python27\python.exe' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@3.1.13 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@3.1.13 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\Chelsea\AppData\Roaming\npm-cache\_logs\2019-09-10T22_53_41_072Z-debug.log
如何解决该错误?
最佳答案
使用Visual Studio Installer获得使用 C++ 进行桌面开发 workload在您计算机上安装的Visual Studio版本之一中:
仔细阅读日志,主要错误是这样的:
msvs_version not set from command line or npm config
在此之后,您会发现其中一些:
"Visual Studio C++ core features" missing
之后:
You need to install the latest version of Visual Studio including the "Desktop development with C++" workload.
For more information consult the documentation at:
最后:
Could not find any Visual Studio installation to use
所以要解决这个问题,你只需要获得“用C++进行桌面开发”的工作量即可。
gyp 然后会找到该版本并使用它:
gyp info find Python using Python version 3.8.1 found at "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\python.exe"
gyp info find VS using VS2019 (16.4.29709.97) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\
以下解决方案假设您有 node安装。免责声明:我没有测试其中任何一个,但我感谢所有报告他们解决此问题的人。
如kaulshapranav wrote in a couple of comments ,稍微缩短/改写:
windows-build-tools installation log mentions this tools package is deprecated and is already included with node. It corrupts my anaconda installation by installing a separate python 2.7 (...); updating npm version from 6 -> 8 solved the issue.
npm 附带 node ,所以解决方案:更新您的 node/npm 版本。但是,如果您需要保留特定版本,nvm (notice the v)允许在它们之间进行更改:simple tutorial on how to use nvm .
如Hamid Jolany's answer建议,在 admin shell 上,只需全局安装构建工具包 ( node-gyp README ):
npm i -g windows-build-tools
Ragavan's idea/answer来自类似的线程:
npm config get msvs_version
验证您是否有 VS 构建工具(如果有,请跳到步骤 4 并尝试设置环境变量)npm config set msvs_version 2019 --global
(或根据 Ragavan 的想法运行 npm config set msvs_version 2015 --global
)VCTargetsPath
环境变量(Win + 搜索 var)设置为适当的路径(例如 C:\Program Files (x86)\MSBuild\Microsoft\Portable\v5.0
) 或通过以管理员身份运行终端,就像 Ragavan 的 2015 构建工具的想法一样:
设置 VCTargetsPath="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140"
$env:VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140
旁注:
关于node.js - 如何解决错误 gypgyp ERR!ERR!发现 VSfind VS msvs_version 未从命令行或 npm 配置设置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57879150/
在编程方面我是个菜鸟。我正在尝试了解 Node.js 和 MongoDB。 下面是我的代码,它将搜索数据库并按州(例如加利福尼亚州、夏威夷州、佛蒙特州等)和最高温度对其进行排序。 当我运行 app.j
我可能在这里遗漏了一些非常简单的东西: package main import ( "fmt" "strconv" "reflect" ) func main() {
我正在尝试运行 npm install bitgo命令但在终端上出现以下错误, npm ERR! code EMFILE npm ERR! syscall spawn git npm ERR! pat
我问了另一个与错误有关的问题。不确定我是否应该编辑该问题。 无论如何,对于下面的代码: app.use((err, req, res, next) => { res.status(err.stat
我正在使用 Promise,并且代码如下所示: function getStuff() { return fetchStuff().then(stuff => process(stuff)
这个问题已经有答案了: Why is `throw` invalid in an ES6 arrow function? (3 个回答) 已关闭 6 年前。 以下代码可以正常工作: pool.get
当我尝试向 redis 添加模块时,出现错误:(err) ERR 不支持的 CONFIG 参数:module-add 我已经通过以下方式安装了动态 redis :- $mkdir -p ~/repos
当我重新分片redis集群时,我遇到了一个问题。 redis集群信息和问题详情如下: obasa04:/usr/redis-4.0.2/src # redis-trib.rb info 10.239.
有什么理由在nodejs中写next(new Error(err))而不是next(err)吗? 非常感谢! 最佳答案 在没有任何上下文的情况下,我假设err已经是一个对象(通常在节点中),因此没有理
我正在尝试创建一个从 API 获取数据的全栈 Node 和 Vue 应用程序。我遇到了一个问题,我试图同时运行客户端和服务器,但代码遇到错误。如果我错误地构建了这个问题,请耐心等待,因为我对编码还很陌
我要更新 npm 最新版本,但显示此错误消息: G:\>npm i -g npm ERR! code ENOLOCAL npm ERR! Could not install from "" as it
为什么在执行 sudo npm install npm 时会出现这个奇怪的错误?我有时在尝试安装其他模块时也会得到它! 错误: > scrypt@6.0.3 preinstall /home/user
我使用 ctypes 围绕 libbgpdump 编写了一个 python 包装器,但是当 libbgpdump 调用“err()”时它会出现段错误。这是失败的 C 代码: if(count > MA
我想运行这个项目:https://github.com/adonis-china/adonis-adminify 当我运行npm install时,存在错误: > sqlite3@3.1.13 ins
我尝试在我的服务器上运行 npm install 并收到此错误。 > node-cron@2.0.3 postinstall /home/workspace/AgreementCancellation
我正在尝试在我的 Node 项目上创建一个错误处理程序,但我不明白一些事情。 对于抛出的错误,我可以从 2 种不同的方式中捕获: 进程.on() process.on('uncaughtExcepti
当我在我的“npm cache clean”中写入时,出现了这个错误“npm ERR!Windows_NT 6.3.9600 npm ERR!argv” C:\iaAC>npm cache clean
在我的 npm run 构建脚本执行后,我很难深入了解我收到的 npm 错误。终端报错如下: npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! vi
我试图在一个新的项目目录中运行 yo angular,但它在途中的某个地方给了我 ENOENT 错误。是的,我看过 this similar question ,但它的解决方案对我不起作用。 在运行
试图在 Ubuntu 18.04 x64 上运行它。它曾经在一天前正常工作,但它突然停止了。 npm i simple-youtube-api 我曾经能够安装它们但不是任何人,我得到这个: > buf
我是一名优秀的程序员,十分优秀!