在 vuepress-Travis CI 构建期间找不到 package.json 文件时出错
Posted
技术标签:
【中文标题】在 vuepress-Travis CI 构建期间找不到 package.json 文件时出错【英文标题】:Error in Couldn't find a package.json file during vuepress-Travis CI construction 【发布时间】:2021-11-25 01:08:32 【问题描述】:我能做什么? 这是出现问题的部分的代码
error Couldn't find a package.json file in "/home/travis/build/comter1/document"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The command "yarn document:build" exited with 1.
$ yarn cname
yarn run v1.22.4
error Couldn't find a package.json file in "/home/travis/build/comter1/document"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The command "yarn cname" exited with 1.
cache.2
store build cache
Done. Your build exited with 1
【问题讨论】:
也许创建一个 package.json 文件? 【参考方案1】:尝试在 cname.sh 文件中更改以下内容:
echo 'comter1.github.io/document/' > document/.vuepress/dist/CNAME
到
echo 'comter1.github.io/document/' > ./.vuepress/dist/CNAME
【讨论】:
以上是关于在 vuepress-Travis CI 构建期间找不到 package.json 文件时出错的主要内容,如果未能解决你的问题,请参考以下文章