WiseLibs / better-sqlite3

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

Installation error: Project file does not exist #422

Closed yeetusdeletuss closed 3 years ago

yeetusdeletuss commented 4 years ago

I tried installing better-sqlite 3, but there are errors that won't let me. Can someone tell me what is wrong?

:\WINDOWS\system32>npm i better-sqlite3

better-sqlite3@7.1.0 install C:\WINDOWS\system32\node_modules\better-sqlite3 prebuild-install || npm run build-release

prebuild-install WARN install No prebuilt binaries found (target=12.18.1 runtime=node arch=x64 libc= platform=win32)

better-sqlite3@7.1.0 build-release C:\WINDOWS\system32\node_modules\better-sqlite3 node-gyp rebuild --release

C:\WINDOWS\system32\node_modules\better-sqlite3>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 ) MSBUILD : error MSB1009: Project file does not exist. Switch: build/binding.sln 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:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! System Windows_NT 10.0.14393 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:\WINDOWS\system32\node_modules\better-sqlite3 gyp ERR! node -v v12.18.1 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! better-sqlite3@7.1.0 build-release: node-gyp rebuild --release npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the better-sqlite3@7.1.0 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\reee.exe\AppData\Roaming\npm-cache_logs\2020-06-22T19_15_26_239Z-debug.log npm WARN enoent ENOENT: no such file or directory, open 'C:\WINDOWS\system32\package.json' npm WARN system32 No description npm WARN system32 No repository field. npm WARN system32 No README data npm WARN system32 No license field.

NexifyUS commented 4 years ago

same issue.

edit: my issue was fixed. i had to download python through cmd and update visual studio through cmd. this maybe the similar issue i had maybe try updating python through cmd to the latest version and make sure you npm is on the latest version

Natemo2625 commented 3 years ago

same issue.

edit: my issue was fixed. i had to download python through cmd and update visual studio through cmd. this maybe the similar issue i had maybe try updating python through cmd to the latest version and make sure you npm is on the latest version

what version of python, npm, and visual studio do you have @NexifyUS because I've ran into a similar issue

Natemo2625 commented 3 years ago

npm i better-sqlite3 better-sqlite3@7.1.1 install /home/runner/Botemo/node_modules/better-sqlite3 prebuild-install || npm run build-release

prebuild-install WARN install No prebuilt binaries found (target=12.18.3 runtime=node arch=x64 libc= platform=linux)

better-sqlite3@7.1.1 build-release /home/runner/Botemo/node_modules/better-sqlite3 node-gyp rebuild --release

make: Entering directory '/home/runner/Botemo/node_modules/better-sqlite3/build' TOUCH b857c92884e9598d609f6be182a2595df7a8e00f.intermediate ACTION deps_sqlite3_gyp_locate_sqlite3_target_extract_sqlite3 b857c92884e9598d609f6be182a2595df7a8e00f.intermediate TOUCH Release/obj.target/deps/locate_sqlite3.stamp CC(target) Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o cc: internal compiler error: Killed (program cc1) Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-6/README.Bugs for instructions. deps/sqlite3.target.mk:183: recipe for target 'Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o' failed make: *** [Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o] Error 4 rm b857c92884e9598d609f6be182a2595df7a8e00f.intermediate make: Leaving directory '/home/runner/Botemo/node_modules/better-sqlite3/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! System Linux 5.4.0-1019-gcp gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release" gyp ERR! cwd /home/runner/Botemo/node_modules/better-sqlite3 gyp ERR! node -v v12.18.3 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! better-sqlite3@7.1.1 build-release: node-gyp rebuild --release npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the better-sqlite3@7.1.1 build-release 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! /home/runner/.npm/_logs/2020-11-21T02_42_34_488Z-debug.log [ ......] / install: info lifecycle better-sqlite3@7[ ......] / install: info lifecycle better-sqlite3@7[ ......] / install: info lifecycle better-sqlite3@7npm WARN discord.js-commando@0.11.0-dev requires a peer of better-sqlite3@^5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN master-bot@1.0.0 No repository field. npm WARN master-bot@1.0.0 No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! better-sqlite3@7.1.1 install: prebuild-install || npm run build-release npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the better-sqlite3@7.1.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! /home/runner/.npm/_logs/2020-11-21T02_42_36_596Z-debug.log

i-chaochen commented 3 years ago

CANNOT INSTALL on macOS too!

Natemo2625 commented 3 years ago

eventually fixed after going back and forth between npm i better-sqlite3 and npm rebuild better-sqlite3

JoshuaWise commented 3 years ago

same issue.

edit: my issue was fixed. i had to download python through cmd and update visual studio through cmd. this maybe the similar issue i had maybe try updating python through cmd to the latest version and make sure you npm is on the latest version

Confirmed that is the solution.