feathersjs
开发框架
nodejs
应用程序,我试图在pm2中实现它,但它不起作用。
drwxr-xr-x 8 root root 4096 Sep 20 06:45 ./
drwx
drwxr-xr-x 2 root root 4096 Sep 20 06:48 config/
-rw-r
-rw-r
drwxr-xr-x 8 root root 4096 Sep 20 07:02 .git/
-rw-r
-rw-r
drwxr-xr-x 391 root root 16384 Sep 20 06:45 node_modules/
-rw-r
-rw-r
-rw-r
drwxr-xr-x 2 root root 4096 Sep 20 06:44 public/
-rw-r
drwxr-xr-x 6 root root 4096 Sep 20 06:48 src/
drwxr-xr-x 3 root root 4096 Sep 20 06:44 test/
-rw-r
这是我的应用程序文件夹结构:
我正沿着这条路跑
$ cd src
$ pm2 start app.js
我得到了以下错误:
0|app | TypeError: Path must be a string. Received undefined
0|app | at assertPath (path.js:7:11)
0|app | at Object.join (path.js:1218:7)
0|app | at Object.<anonymous> (/home/limitless/Documents/projects/work/iRouteApp/src/app.js:36:22)
0|app | at Module._compile (module.js:570:32)
0|app | at Object.Module._extensions..js (module.js:579:10)
0|app | at Module.load (module.js:487:32)
0|app | at tryModuleLoad (module.js:446:12)
0|app | at Function.Module._load (module.js:438:3)
0|app | at Object.<anonymous> (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:70:21)
0|app | at Module._compile (module.js:570:32)
0|app | at Object.Module._extensions..js (module.js:579:10)
0|app | at Module.load (module.js:487:32)
0|app | at tryModuleLoad (module.js:446:12)
0|app | at Function.Module._load (module.js:438:3)
0|app | at Module.runMain (module.js:604:10)
0|app | at run (bootstrap_node.js:389:7)
0|app | at startup (bootstrap_node.js:149:9)
0|app | at bootstrap_node.js:502:3
PM2 | App [app] with id [0] and pid [14134], exited with code [1] via signal [SIGINT]
PM2 | Starting execution sequence in -fork mode- for app name:app id:0
PM2 | App name:app id:0 online
0|app | WARNING: NODE_APP_INSTANCE value of '0' did not match any instance config file names.
0|app | WARNING: See https:
0|app | WARNING: No configurations found in configuration directory:/home/limitless/Documents/projects/work/iRouteApp/src/config
0|app | WARNING: To disable this warning set SUPPRESS_NO_CONFIG_WARNING in the environment.