chenyukang / obweb

ObWeb = Obsidian on Mobile + Flomo + Rss Reader
213 stars 22 forks source link

运行不起来... #6

Closed yingpwu closed 2 years ago

yingpwu commented 2 years ago
root@debian:~/obweb/obweb-main/backend# npm install
npm WARN npm npm does not support Node.js v10.24.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!

> sqlite3@5.0.6 install /root/obweb/obweb-main/backend/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

[sqlite3] Success: "/root/obweb/obweb-main/backend/node_modules/sqlite3/lib/binding/napi-v6-linux-glibc-x64/node_sqlite3.node" is installed via remote

> better-sqlite3@7.5.1 install /root/obweb/obweb-main/backend/node_modules/better-sqlite3
> prebuild-install || npm run build-release

> nodemon@2.0.15 postinstall /root/obweb/obweb-main/backend/node_modules/nodemon
> node bin/postinstall || exit 0

Love nodemon? You can now support the project via the open collective:
 > https://opencollective.com/nodemon/donate

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 1015 packages from 645 contributors in 34.31s
root@debian:~/obweb/obweb-main/backend# cd front
-bash: cd: front: No such file or directory
root@debian:~/obweb/obweb-main/backend# cd ..
root@debian:~/obweb/obweb-main# cd front/
root@debian:~/obweb/obweb-main/front# ls
node_modules  package.json  package-lock.json  public  README.md  rollup.config.js  scripts  src
root@debian:~/obweb/obweb-main/front# npm install
npm WARN npm npm does not support Node.js v10.24.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
npm WARN ws@7.5.5 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.5.5 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

up to date in 0.908s
root@debian:~/obweb/obweb-main/front# cd ..
root@debian:~/obweb/obweb-main# ./b
backend/ bin/
root@debian:~/obweb/obweb-main# ./b
backend/ bin/
root@debian:~/obweb/obweb-main# ./b
backend/ bin/
root@debian:~/obweb/obweb-main# ./bin/dev.sh
~/obweb/obweb-main/ob ~/obweb/obweb-main
error: pathspec 'main' did not match any file(s) known to git
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=<remote>/<branch> master

~/obweb/obweb-main
~/obweb/obweb-main/front ~/obweb/obweb-main
npm WARN npm npm does not support Node.js v10.24.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
npm WARN ws@7.5.5 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.5.5 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

up to date in 0.89s
npm WARN npm npm does not support Node.js v10.24.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/

> svelte-app@1.0.0 build /root/obweb/obweb-main/front
> rollup -c

src/main.js → public/build/bundle.js...
created public/build/bundle.js in 3.5s
~/obweb/obweb-main
~/obweb/obweb-main/backend ~/obweb/obweb-main
npm WARN npm npm does not support Node.js v10.24.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/

> ob-web@1.0.0 dev /root/obweb/obweb-main/backend
> nodemon server.js

[nodemon] 2.0.15
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node server.js`

在fron 和backend 里 npm install后 运行 ./bin/dev.sh 然后显示在starting node server.js 端口 3000和8006没有页面

直接运行docker 日志显示

ob-web@1.0.0 dev nodemon server.js sh: 1: nodemon: not found

折腾了2天没搞定,对项目的工作流不怎么懂,一头雾水 请求指教下,还有哪个必要步骤没有初始化

yingpwu commented 2 years ago

换debian 和centos 都试了 都没效果....

chenyukang commented 2 years ago

我看你的node版本是 10,可以升级到 18。

确保你的ob目录是可以用git提交改动的,现在看起来有这个错误:

error: pathspec 'main' did not match any file(s) known to git
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=<remote>/<branch> master

运行 ./bin/dev.sh 后访问这个地址:

http://localhost:8006/front/index.html

yingpwu commented 2 years ago

感谢指导,运行起来了,我这边外网网络环境有点卡,运行起来操作笔记有点困难...

chenyukang commented 2 years ago

感谢指导,运行起来了,我这边外网网络环境有点卡,运行起来操作笔记有点困难...

换成 gitee? hah

yingpwu commented 2 years ago

搭了个gitlab.....解决了访问慢问题😄️ rss这个完全不明白,读取的数据库是从哪写入的😭️ obweb整个程序是真的妙啊,感觉就像打开新世界的大门,这个工作流好好学习学习

chenyukang commented 2 years ago

我用一个 crontab job,每五分钟同步一次

*/5 * * * * cd /home/coder/ob-web/backend && NODE_ENV=production node update.js 1 > ./update.log 2>&1
yingpwu commented 2 years ago

感谢回复,研究研究,🙏🏻️