即使存在依赖项,npm 也无法安装 quick.db
Posted
技术标签:
【中文标题】即使存在依赖项,npm 也无法安装 quick.db【英文标题】:npm can't install quick.db even it's dependencies are present 【发布时间】:2020-10-30 16:56:27 【问题描述】:我有 quick.db 的依赖项,但我仍然无法安装它。我得到了 Python 2.x 和 Microsoft Visual C++ Build Tools。我不知道为什么它不会让我安装 quick.db... 谁能帮我修复它?
这是日志:
PS C:\Users\scott\Documents\SCOTTDEVELOP> npm install quick.db
> integer@3.0.1 install C:\Users\scott\Documents\SCOTTDEVELOP\node_modules\integer
> prebuild-install || npm run build-release
prebuild-install WARN install No prebuilt binaries found (target=12.16.1 runtime=node arch=x64 libc= platform=win32)
> integer@3.0.1 build-release C:\Users\scott\Documents\SCOTTDEVELOP\node_modules\integer
> node-gyp rebuild --release
C:\Users\scott\Documents\SCOTTDEVELOP\node_modules\integer>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --release ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild --release )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
integer.cpp
win_delay_load_hook.cc
..\src\integer.cpp(370): warning C4804: '-': unsafe use of type 'bool' in operation [C:\Users\scott\Documents\SCOTTDEVE
LOP\node_modules\integer\build\integer.vcxproj]
C:\\Users\\scott\\AppData\\Local\\node-gyp\\Cache\\12.16.1\\x64\\node.lib : fatal error LNK1106: invalid file or disk f
ull: cannot seek to 0x2FC71E [C:\Users\scott\Documents\SCOTTDEVELOP\node_modules\integer\build\integer.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\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:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:311:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.19041
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 C:\Users\scott\Documents\SCOTTDEVELOP\node_modules\integer
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! integer@3.0.1 build-release: `node-gyp rebuild --release`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the integer@3.0.1 build-release script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\scott\AppData\Roaming\npm-cache\_logs\2020-07-10T01_18_07_632Z-debug.log
npm WARN edinburgh@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! integer@3.0.1 install: `prebuild-install || npm run build-release`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the integer@3.0.1 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\scott\AppData\Roaming\npm-cache\_logs\2020-07-10T01_18_08_872Z-debug.log
【问题讨论】:
【参考方案1】:不知何故,我设法安装了 quick.db。 我刚刚安装了最新版本的 node.js。
【讨论】:
以上是关于即使存在依赖项,npm 也无法安装 quick.db的主要内容,如果未能解决你的问题,请参考以下文章
为啥某些依赖项无法使用 npm 安装,而是使用 bower 安装,反之亦然
使用 webpack 时出现 npm 安装错误,无法解析依赖项