rm -rf .nuxt && yarn install && yarn dev
Cannot read properties of undefined (reading '$get')
yarn add @nuxtjs/axios
// nuxt.config.js export default { // @nuxtjs/axios を使用する場合 modules: [ '@nuxtjs/axios', ], // その他の設定... }
// @nuxtjs/axios を使用する場合 async asyncData({ $axios }) { const pages = await $axios.$get('/pages.json'); return { pages }; }
コミット済みのファイルがgitignoreに追記してもignoreされない
git rm --cached ./static/pages.json
stylelintでUnknown rule hoge-rule-nameが大量に出る
概要
stylelint系のバージョンが古いので最新化して解決
手順
stylelint系ライブラリ最新化
yarn add stylelint stylelint-config-recommended-vue stylelint-config-standard
依存関係を再インストール
rm -rf node_modules yarn.lock && yarn
以上で解決。
webpackで不要な依存関係を入れて消したけど、挙動がおかしいまま
package.jsonやlockファイルを消した後、yarnしなおしでOK