首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >通过systemd服务在节点js上启动Wiki js

通过systemd服务在节点js上启动Wiki js
EN

Stack Overflow用户
提问于 2022-10-03 10:44:24
回答 1查看 74关注 0票数 2

如果我通过putty启动服务器

代码语言:javascript
运行
复制
node server

服务器的启动非常完美。

如果我试图通过serverd启动服务器,就会发生错误。

代码语言:javascript
运行
复制
* wiki.service - Wiki.js

   Loaded: loaded (/etc/systemd/system/wiki.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Mon 2022-10-03 13:35:00 MSK; 5s ago
  Process: 6447 ExecStart=/usr/bin/node server (code=exited, status=0/SUCCESS)
 Main PID: 6447 (code=exited, status=0/SUCCESS)

Oct 03 13:35:00  node[6447]:     at require (internal/module.js:11:18)
Oct 03 13:35:00  node[6447]:     at Object.<anonymous> (/var/www/wiki/node_modules/fs-extra/lib/mkdirs/index.js:3:44)
Oct 03 13:35:00  node[6447]:     at Module._compile (module.js:653:30)
Oct 03 13:35:00  node[6447]:     at Object.Module._extensions..js (module.js:664:10)
Oct 03 13:35:00  node[6447]:     at Module.load (module.js:566:32)
Oct 03 13:35:00  node[6447]:     at tryModuleLoad (module.js:506:12)
Oct 03 13:35:00  node[6447]:     at Function.Module._load (module.js:498:3)
Oct 03 13:35:00  node[6447]:     at Module.require (module.js:597:17)
Oct 03 13:35:00  node[6447]: (node:6447) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise whic
Oct 03 13:35:00  node[6447]: (node:6447) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit

如果我允许wiki用户进入终端并尝试从那里启动它

代码语言:javascript
运行
复制
node server

然后,错误如下

代码语言:javascript
运行
复制
Loading configuration from /var/www/wiki/config.yml... OK
2022-10-03T10:19:40.835Z [MASTER] info: =======================================
2022-10-03T10:19:40.837Z [MASTER] info: = Wiki.js 2.5.289 =====================
2022-10-03T10:19:40.837Z [MASTER] info: =======================================
2022-10-03T10:19:40.837Z [MASTER] info: Initializing...
(node:6326) UnhandledPromiseRejectionWarning: /var/www/wiki/node_modules/fs-extra/lib/mkdirs/make-dir           .js:85
      } catch {
              ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:617:28)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/var/www/wiki/node_modules/fs-extra/lib/mkdirs/index.js:3:44)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
(node:6326) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated eith           er by throwing inside of an async function without a catch block, or by rejecting a promise which was            not handled with .catch(). (rejection id: 1)
(node:6326) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future,            promise rejections that are not handled will terminate the Node.js process with a non-zero exit code           .

ubuntu 18.04节点v16.17.1 ltc

EN

Stack Overflow用户

发布于 2022-10-11 11:49:08

我遇到的问题是环境问题。默认情况下,8.7.1版本启动了wiki节点。它需要在用户下登录并从他下面安装所需的版本。这个问题已经解决了

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

https://stackoverflow.com/questions/73934312

复制
相关文章

相似问题

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