better-sqlite3
better-sqlite3 copied to clipboard
Installation error: cannot open file 'gdi32.lib'
I'm trying to install better sqlite, but for some reason i keep on having the same issue.
LINK : fatal error LNK1104: cannot open file 'gdi32.lib' [C:\Users\Admin\Desktop\Projects\Discord Bot\node_modules\better-sqlite3\build\better_sq lite3.vcxproj] test_extension.c win_delay_load_hook.cc LINK : fatal error LNK1104: cannot open file 'gdi32.lib' [C:\Users\Admin\Desktop\Projects\Discord Bot\node_modules\better-sqlite3\build\test_exte nsion.vcxproj] gyp ERR! build error gyp ERR! stack Error:
C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exefailed 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:310:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! System Windows_NT 10.0.18363 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\Admin\Desktop\Projects\Discord Bot\node_modules\better-sqlite3 gyp ERR! node -v v12.16.2 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] build-release:
node-gyp rebuild --release`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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\Admin\AppData\Roaming\npm-cache_logs\2020-08-13T12_42_32_731Z-debug.log npm WARN [email protected] requires a peer of erlpack@hammerandchisel/erlpack#master but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of node-opus@^0.2.0 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of opusscript@^0.0.1 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of uws@^0.12.0 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: prebuild-install || npm run build-release
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.`
Thats the error message i get and have been stuck with for quite some time now.
There seems to be a lot of issue installing on windows lately, the developer could fix these by providing prebuilt binaries for windows, like he does for linux
The same problem occurs in mac (catalina), too.
The same problem with me, but i do npm rebuild
or rm -rf node_modules && npm install
that's work!
Has anyone tried the solution presented by @hansputera ?
my friends 😅
Has anyone tried the solution presented by @hansputera ?
I tried it on macOS, none of works.
❯ npm install better-sqlite3
(node:30718) ExperimentalWarning: The fs.promises API is experimental
npm ERR! code 1
npm ERR! path .../node_modules/better-sqlite3
npm ERR! command failed
npm ERR! command sh -c prebuild-install || npm run build-release
npm ERR! > [email protected] build-release
npm ERR! > node-gyp rebuild --release
npm ERR! (node:30748) ExperimentalWarning: The fs.promises API is experimental
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | x64
npm ERR! gyp info spawn /usr/bin/python2
npm ERR! gyp info spawn args [ '.../node_modules/node-gyp/gyp/gyp_main.py',
❯ node --version v10.15.1
MacOS:
- Install XCode
- Once XCode is installed, go to Preferences, Downloads, and install the Command Line Tools.
Windows:
- npm i -g --add-python-to-path --vs2015 --production windows-build-tools
- npm i -g node-gyp@latest
Linux:
- sudo apt-get install build-essential
Source: https://enmap.evie.dev/install#pre-requisites
Has anyone tried the solution presented by @hansputera ?
I have not. I dont have a mac and I plain refuse to install anything Visual Studio on my machines (if some software bundles it then sure I guess, but I don't like it)
Has anyone tried the solution presented by @hansputera ?
I just tried it (the vs2015 part), and can confirm it works, though I'd like to point out that if your using nvm with custom paths, you may have to move some files yourself
Has anyone tried the solution presented by @hansputera ?
I just tried it (the vs2015 part), and can confirm it works, though I'd like to point out that if your using nvm with custom paths, you may have to move some files yourself
I just try to downgrade the node version to v12, and it works.
I tried with node version v15 and v14 won't work.
Can you see if it works in v7.4.4
?
Closing due to inactivity