vuepressを使用してエラーを報告します.
1609 ワード
yarn docs:dev
vuepress Can't resolve 'sass-loader'
//
yarn add -D sass-loader node-sass
yarn docs:build
Vue packages version mismatch:
- [email protected]
- [email protected]
This may cause things to work incorrectly.
Make sure to use the same version for both.
依存バージョンが異なると推測
// package.json
"devDependencies": {
"vue-server-renderer":"^2.5.21"
}
// vue
yarn add vue global
3.vue-loaderエラー
yarn docs:build
Error: [vue-loader] vue-template-compiler must be installed
as a peer dependency, or a compatible compiler implementation
must be passed via options.
バージョンが間違っている可能性があります
//package.json 2.5.21
"devDependencies": {
"vue-template-compiler": "^2.5.22",
}
4.レンダリングコンポーネントdemoエラー
yarn docs:build
Error rendering /components/button/:
Error: render function or template not defined in component: button-demo
コンポーネントは、ブラウザAPIに従ってレンダリングされたドキュメントである可能性があります.
// , SSR ( ),
// :
5.配置倉庫ディレクトリの追加
//.vuepress/config.js
module.exports = {
base: '/gulu-xingkongs/'
}
5.デプロイ時にdeploy.sh権限の追加
chmod +x deploy.sh