首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >不能再好了-在我的树莓派上安装了sqlite3

不能再好了-在我的树莓派上安装了sqlite3
EN

Stack Overflow用户
提问于 2021-01-23 21:47:56
回答 1查看 429关注 0票数 0

我目前正尝试在我的树莓派上运行我的Discord机器人,但是我不能在上面安装Better-Sqlite3。我真的不知道如何处理所有这些错误或他们告诉我什么,所以我希望这里有人能帮助我解决我的问题。如果您需要任何其他信息,请让我知道。

代码语言:javascript
复制
> better-sqlite3@7.1.2 install /home/pi/Discord Bot/node_modules/better-sqlite3
> prebuild-install || npm run build-release

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

> better-sqlite3@7.1.2 build-release /home/pi/Discord Bot/node_modules/better-sqlite3
> node-gyp rebuild --release

make: Entering directory '/home/pi/Discord Bot/node_modules/better-sqlite3/build'
  TOUCH b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
  ACTION deps_sqlite3_gyp_locate_sqlite3_target_extract_sqlite3 b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
/bin/sh: 1: Bot/node_modules/better-sqlite3/build/Release/lib.host:/home/pi/Discord: not found
/home/pi/Discord Bot/node_modules/better-sqlite3/deps/extract.js:8
process.on('unhandledRejection', (err) => { throw err; });
                                            ^

CwdError: ENOENT: Cannot cd into '/home/pi/Discord Bot/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3'
    at fs.stat (/home/pi/Discord Bot/node_modules/tar/lib/mkdir.js:74:14)
    at FSReqWrap.oncomplete (fs.js:153:21)
make: *** [deps/locate_sqlite3.target.mk:17: b857c92884e9598d609f6be182a2595df7a8e00f.intermediate] Error 1
rm b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
make: Leaving directory '/home/pi/Discord Bot/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/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:191:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.4.51-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /home/pi/Discord Bot/node_modules/better-sqlite3
gyp ERR! node -v v10.23.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.2 build-release: `node-gyp rebuild --release`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the better-sqlite3@7.1.2 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!     /home/pi/.npm/_logs/2021-01-23T13_30_26_759Z-debug.log
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/Discord Bot/package.json'
npm WARN Discord Bot No description
npm WARN Discord Bot No repository field.
npm WARN Discord Bot No README data
npm WARN Discord Bot No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! better-sqlite3@7.1.2 install: `prebuild-install || npm run build-release`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the better-sqlite3@7.1.2 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/pi/.npm/_logs/2021-01-23T13_30_27_548Z-debug.log

npm启动错误:

代码语言:javascript
复制
pi@raspberrypi:~/Discord Bot $ npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/pi/Discord Bot/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/pi/Discord Bot/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2021-01-23T17_14_30_893Z-debug.log
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-01-27 21:21:18

好了,我找到了解决问题的办法。我在机器人的文件夹名称中有一个“空格”,这就是为什么要安装better-sqlite3的程序员找不到这个文件夹,它崩溃了。我只是删除了空格,它工作得很好。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65859924

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档