nuxt-api-example
nuxt-api-example copied to clipboard
TypeError: Cannot read property 'push' of undefined
When I run npm run dev I get the following errors:
❯ npm run dev
> [email protected] dev /home/anton/git/nuxt-api-example
> nuxt
ERROR Nuxt error
TypeError: Cannot read property 'push' of undefined
and
ERROR Failed to compile with 3 errors 10:41:23
These dependencies were not found:
* ~components/Header.vue in ./node_modules/babel-loader/lib?{"babelrc":false,"cacheDirectory":true,"presets":[["/home/anton/git/nuxt-api-example/node_modules/babel-preset-vue-app/dist/index.common.js",{"targets":{"ie":9,"uglify":true}}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./layouts/default.vue
* ~plugins/axios.js in ./store/index.js
* ~static/markdownFiles/HomeContent.md in ./node_modules/babel-loader/lib?{"babelrc":false,"cacheDirectory":true,"presets":[["/home/anton/git/nuxt-api-example/node_modules/babel-preset-vue-app/dist/index.common.js",{"targets":{"ie":9,"uglify":true}}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/index.vue
To install them, you can run: npm install --save ~components/Header.vue ~plugins/axios.js ~static/markdownFiles/HomeContent.md
I experienced the same and solved it like that:
1.) use the latest version of markdownit
in your package.json change to"@nuxtjs/markdownit": "latest", (v.1.2.1 is the latest one)
2.) replace all dependency load paths like ~components/Header.vue with ~/components/Header.vue or better @/components/Header.vue
.. it's basicly the missing / i guess