vuepress用travis-cli持续集成时出现个问题

发布于 2022-09-12 00:49:43 字数 932 浏览 22 评论 0


install.npm

2010.80s$ npm ci 

204

2050.18s$ npm run docs:build

206

207\> newNode@1.0.0 docs:build /home/travis/build/15835196981/newNodeCode

208\> vuepress build docs

209

210sh: 1: vuepress: not found

211npm  ERR!  code ELIFECYCLE

212npm  ERR!  syscall spawn

213npm  ERR!  file sh

214npm  ERR!  errno ENOENT

215npm  ERR! newNode@1.0.0 docs:build: \`vuepress build docs\`

216npm  ERR! spawn ENOENT

217npm  ERR!  

218npm  ERR! Failed at the newNode@1.0.0 docs:build script.

219npm  ERR! This is probably not a problem with npm. There is likely additional logging output above.

220

221npm  ERR! A complete log of this run can be found in:

222npm  ERR! /home/travis/.npm/\_logs/2020-01-26T07\_54\_52\_752Z-debug.log

223The command "npm run docs:build" exited with 1.

cache.2

224store build cache

228

229

230Done. Your build exited with 1.

这个是travis后台提示的错误,怎么安装vuepress呢

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

剑心龙吟 2022-09-19 00:49:43

自己解决
.travis.yml文件里写上安装vuepress的命令就行了

script:  
  - npm i vuepress # 环境里没有vuepress时需要这一行
  - npm run docs:build # 执行命令
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文