添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I'm using a raspberry pi 4 as well as Visual Studio Code to setup and run my bot. All of my packages were installed, except for better-sqlite3 . I tried re-installing node-gyp (successfully installed) and then re-installing better-sqlite3 again, here is my error:

$npm i better-sqlite3
  • better-sqlite3@7.1.1 install /home/pi/Code/Waffles/node_modules/better-sqlite3
  • prebuild-install || npm run build-release
  • prebuild-install WARN install No prebuilt binaries found (target=14.15.0 runtime=node arch=arm libc= platform=linux)
  • better-sqlite3@7.1.1 build-release /home/pi/Code/Waffles/node_modules/better-sqlite3
  • node-gyp rebuild --release
  • make: Entering directory '/home/pi/Code/Waffles/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
  • Windows

    To fix this problem, open an administrative PowerShell window, and run

    npm i -g --add-python-to-path --vs2015 --production windows-build-tools
    

    Once thats done (it may take up to 30 minutes, depending on your internet and computer speed) restart your pc, and it should work

    Linux

    To fix this on linux, run

    sudo apt-get install build-essential
    

    and then install better-sqlite3.

    To fix this on mac, simply

     - Install [XCode][1]
     - Once XCode is installed, go to Preferences, Downloads, and install the Command Line Tools.
    

    then better-sqlite should be installed correctly.

    Hope this helps!

    Note: I've noticed you're a new contributor, first of all, welcome to StackOverflow, second of all, be sure to mark your question as solved by clicking the check next to the answer that helped you, so people know its solved.

    That is not an error, It is the better-sqlite3 Installer, following errors could appear like this below

    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:262:23)
    gyp ERR! stack     at emitTwo (events.js:126:13)
    gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
    gyp ERR! System Linux 4.15.0-45-generic
    gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /media/jeremiah/Discord bot/Discord bot/node_modules/better-sqlite3
    gyp ERR! node -v v8.10.0
    gyp ERR! node-gyp -v v3.8.0
    gyp ERR! not ok
                    There was nothing like that. It stopped giving anything else and just left an unfunctional node terminal. The only thing i could do is close it. No errors like that were given
    – Akagi-sama
                    Nov 19, 2020 at 0:52
            

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question. Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers.