我正在尝试在我的debian 10 vps forever start npm start
中运行此命令,但在终端中出现此错误,
warn: --minUptime not set. Defaulting to: 1000ms
warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info: Forever processing file: npm
(node:23858) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:23858) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
error: Cannot start forever
error: script /root/node_projects/tiktok/backend/npm does not exist.
这是我的package.json文件
{
"name": "auth-graphql",
"version": "1.0.0",
"description": "",
"main": "src/index.js",
"engines": {
"node": "10.11.0"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "node -r esm ./src/index.js",
"start": "nodemon -r esm ./src/index.js"
},
"author": "",
"license": "ISC",
"dependencies": {
...
"esm": "^3.2.0",
...
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-stage-2": "^6.24.1",
"nodemon": "^1.18.4"
}
}
我尝试过
forever start esm ./src/index.js
forever start -c "npm start" ./
forever start -c "npm start" /path/dir/
forever --sourceDir /path/dir/ -c "npm start" /
而且我也遇到了几乎相同的错误,请我需要帮助,如何解决此问题
尝试此命令:
forever start -c "npm start" ./
运行应用程序的特定目录:
forever start -c "npm start" /path/dir/
或使用此命令:
forever --sourceDir /path/dir/ -c "npm start" /