关于该文档项目搭建在linux上并实现持久访问的问题
来源:1-1 课程介绍

前端是我菜
2020-10-22
本人想将项目搭载自己服务器上方便查看;;;;
但是问题来了,看下面;
- 当执行
npm run dev
台可以启动项目可以成功而且本地访问也没问题。 - 当我想要将命令启动到后台,避免服务器退出时可以继续访问
- 此时执行
nohup npm run dev &
怎么执行都不能成功!!!
- 打印的报错日志如下:
my.log中
> ts-axios-doc@1.0.events.js:187
throw er; // Unhandled 'error' event
^
Error: EBADF: bad file descriptor, read
Emitted 'error' event on ReadStream instance at:
at internal/fs/streams.js:167:12
at FSReqCallback.wrapper [as oncomplete] (fs.js:481:5) {
errno: -9,
code: 'EBADF',
syscall: 'read'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ts-axios-doc@1.0.0 dev: `vuepress dev docs`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ts-axios-doc@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-10-22T07_47_31_922Z-debug.log
求解决方法,看到速回哦,近期要开始练习该项目了~~
如果已经有解决方案的话,发个链接过来我自己按着步骤来解答。
谢谢老师,祝老师事业步步高升,家庭幸福美满~
写回答
1回答
-
如果是部署这个文档,可以 npm run build 生成一个静态文件目录 dist,然后部署 dist 里的静态页面就可以了,根本不需要起 node 服务。
112020-10-22
相似问题