我正试着运行我的程序,但redis一直不停地退出。我的脚本:
"scripts": {
"test": "jest --watchAll",
"start": "npm run build-client && node index.js",
"dev": "npm run dev-client & npm run start-redis && cross-env ENV='development' nodemon index.js",
"dev-peer": "cross-env GENERATE_PEER_PORT='true' ENV='development' nodemon index.js",
"start-redis": "redis-server --daemonize yes",
"build-client": "npm run clean && parcel build client/src/index.html --out-dir client/dist",
"dev-client": "npm run clean && parcel client/src/index.html --out-dir client/dist",
"clean": "rm -rf .cache client/dist"
},
执行npm run dev时的相关错误日志:
xmickellx@DESKTOP-JJ707K1:/mnt/c/users/mickell/desktop/Cypher-Network$ npm run dev
> cypher-network@0.0.0 dev /mnt/c/users/mickell/desktop/Cypher-Network
> npm run dev-client & npm run start-redis & cross-env ENV='development' nodemon index.js
> cypher-network@0.0.0 start-redis /mnt/c/users/mickell/desktop/Cypher-Network
> redis-server --daemonize yes
> cypher-network@0.0.0 dev-client /mnt/c/users/mickell/desktop/Cypher-Network
> npm run clean && parcel client/src/index.html --out-dir client/dist
12559:C 02 Mar 01:51:42.481 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
12559:C 02 Mar 01:51:42.482 # Redis version=4.0.9, bits=64, commit=00000000, modified=0, pid=12559, just started
12559:C 02 Mar 01:51:42.483 # Configuration loaded
[nodemon] 1.18.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node index.js`
> cypher-network@0.0.0 clean /mnt/c/users/mickell/desktop/Cypher-Network
> rm -rf .cache client/dist
Server running at http://localhost:1234
listening at localhost:3000
然后很快退出并在没有服务器的情况下再次运行
⠦ Packaging...[nodemon] restarting due to changes...
⠧ Packaging...[nodemon] starting `node index.js`
⠋ Building hmr-runtime.js...[nodemon] restarting due to changes...
[nodemon] starting `node index.js`
✨ Built in 19.40s.
listening at localhost:3000
暂无答案!
目前还没有任何答案,快来回答吧!