WiseLibs / better-sqlite3

The fastest and simplest library for SQLite3 in Node.js.
MIT License
5.48k stars 396 forks source link

Can not install better-sqlite3 #279

Closed Dipsip6969 closed 4 years ago

Dipsip6969 commented 5 years ago

I keep getting these errors when I try to install it

gyp ERR! configure error gyp ERR! stack Error: Command failed: C:\Users\Ahmad Alfalasi\AppData\Local\Programs\Python\Python37-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3]; gyp ERR! stack File "", line 1 gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3]; gyp ERR! stack ^ gyp ERR! stack SyntaxError: invalid syntax gyp ERR! stack gyp ERR! stack at ChildProcess.exithandler (child_process.js:294:12) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at maybeClose (internal/child_process.js:962:16) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5) gyp ERR! System Windows_NT 10.0.17134 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Ahmad Alfalasi\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\Ahmad Alfalasi\Desktop\Current bots\bot\node_modules\integer gyp ERR! node -v v10.15.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Ahmad Alfalasi\Desktop\Current bots\bot\package.json' npm WARN discord.js@11.5.1 requires a peer of bufferutil@^4.0.0 but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.5.1 requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.5.1 requires a peer of libsodium-wrappers@^0.7.3 but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.5.1 requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.5.1 requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.5.1 requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.5.1 requires a peer of @discordjs/uws@^10.149.0 but none is installed. You must install peer dependencies yourself. npm WARN bot No description npm WARN bot No repository field. npm WARN bot No README data npm WARN bot No license field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! integer@2.1.0 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the integer@2.1.0 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\Ahmad Alfalasi\AppData\Roaming\npm-cache_logs\2019-06-21T12_06_10_612Z-debug.log

Custardcs commented 5 years ago

please search through the other issues.. your question has most likely been answered.

but to quickly sum it up.

you need to install windows build tools. then python if it doesn't install maybe add the path to the environment. then run npm. then do the rebuild. if you want more info just search!

Dipsip6969 commented 5 years ago

Done that method already, doesn't work at all

mandaputtra commented 5 years ago

Hi, do you install node.js with nvm or not?

mceachen commented 5 years ago

Follow every step here: https://github.com/JoshuaWise/better-sqlite3/issues/170#issuecomment-441734343

JoshuaWise commented 5 years ago

SyntaxError: invalid syntax

It looks like a mismatched version of Python or JavaScript

cekvenich commented 4 years ago

Let me know it this fixes it, run before install: npm i -g node-gyp@latest

JoshuaWise commented 4 years ago

Closing due to inactivity

karelkryda commented 3 years ago

npm i -g node-gyp@latest

I have same issue, this doesn't help

gelato-mio commented 1 year ago

same issue here on Mac osMonteray

jcguarinpenaranda commented 1 year ago

+1