если запустить из putty
node server
то сайт запускается все отлично работает.
Пытаюсь добавить все в сервисы:
[Unit]
Description=Wiki.js
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/node server
Restart=always
User=wiki
Environment=NODE_ENV=production
WorkingDirectory=/var/www/wiki
[Install]
WantedBy=multi-user.target
Сервис умирает через 5 попыток
логи
Sep 30 15:37:25 node[9423]: Loading configuration from /var/www/wiki/config.yml... OK
Sep 30 15:37:25 node[9423]: 2022-09-30T12:37:25.937Z [MASTER] info: =======================================
Sep 30 15:37:25 node[9423]: 2022-09-30T12:37:25.939Z [MASTER] info: = Wiki.js 2.5.289 =====================
Sep 30 15:37:25 node[9423]: 2022-09-30T12:37:25.939Z [MASTER] info: =======================================
Sep 30 15:37:25 node[9423]: 2022-09-30T12:37:25.939Z [MASTER] info: Initializing...
Sep 30 15:37:26 node[9423]: (node:9423) UnhandledPromiseRejectionWarning: /var/www/wiki/node_modules/fs-extra/lib/mkdirs/make-dir.js:85
Sep 30 15:37:26 node[9423]: } catch {
Sep 30 15:37:26 node[9423]: ^
Sep 30 15:37:26 node[9423]: SyntaxError: Unexpected token {
Sep 30 15:37:26 node[9423]: at createScript (vm.js:80:10)
Sep 30 15:37:26 node[9423]: at Object.runInThisContext (vm.js:139:10)
Sep 30 15:37:26 node[9423]: at Module._compile (module.js:617:28)
Sep 30 15:37:26 node[9423]: at Object.Module._extensions..js (module.js:664:10)
Sep 30 15:37:26 node[9423]: at Module.load (module.js:566:32)
Sep 30 15:37:26 node[9423]: at tryModuleLoad (module.js:506:12)
Sep 30 15:37:26 node[9423]: at Function.Module._load (module.js:498:3)
Sep 30 15:37:26 node[9423]: at Module.require (module.js:597:17)
Sep 30 15:37:26 node[9423]: at require (internal/module.js:11:18)
Sep 30 15:37:26 node[9423]: at Object.<anonymous> (/var/www/wiki/node_modules/fs-extra/lib/mkdirs/index.js:3:44)
Sep 30 15:37:26 node[9423]: at Module._compile (module.js:653:30)
Sep 30 15:37:26 node[9423]: at Object.Module._extensions..js (module.js:664:10)
Sep 30 15:37:26 node[9423]: at Module.load (module.js:566:32)
Sep 30 15:37:26 node[9423]: at tryModuleLoad (module.js:506:12)
Sep 30 15:37:26 node[9423]: at Function.Module._load (module.js:498:3)
Sep 30 15:37:26 node[9423]: at Module.require (module.js:597:17)
Sep 30 15:37:26 node[9423]: (node:9423) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throw
Sep 30 15:37:26 node[9423]: (node:9423) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise re
Sep 30 15:37:26 systemd[1]: wikijs.service: Service hold-off time over, scheduling restart.
Sep 30 15:37:26 systemd[1]: wikijs.service: Scheduled restart job, restart counter is at 5.
Sep 30 15:37:26 systemd[1]: Stopped Wiki.js.
Sep 30 15:37:26 systemd[1]: wikijs.service: Start request repeated too quickly.
Sep 30 15:37:26 systemd[1]: wikijs.service: Failed with result 'start-limit-hit'.
Sep 30 15:37:26 systemd[1]: Failed to start Wiki.js.
модуль fs-extra обновлен.
Версия node 16.17.1 lts
nmp 8.19.2