Hi!
When I run the async-data as npm run dev
everything works fine. But when I run it as nuxt
I get an error:
Vue.js error
Error: Cannot find module 'axios'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (__vue_ssr_bundle__:1056:18)
at __webpack_require__ (__vue_ssr_bundle__:21:30)
at Object.module.exports.Object.defineProperty.value (__vue_ssr_bundle__:1909:64)
at __webpack_require__ (__vue_ssr_bundle__:21:30)
at Object.<anonymous> (__vue_ssr_bundle__:3427:3)
at __webpack_require__ (__vue_ssr_bundle__:21:30)
The same problem is with building the app. I can build it with npm run build
but not with nuxt build
. It gives:
ERROR in c:/Users/art/AppData/Roaming/npm/~/nuxt/~/extract-text-webpack-plugin/loader.js?{"omit":0,"remove":true}!C:/Users/art/AppData/Roaming/npm/~/nuxt/~/css-loader!c:/Users/art/AppData/Roaming/npm/~/nuxt/~/vue-loader/lib/style-rewriter.js?id=data-v-0ded5cf2&scoped=true!c:/Users/art/AppData/Roaming/npm/~/nuxt/~/vue-loader/lib/selector.js?type=styles&index=0!./.nuxt/components/nuxt-error.vue
Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin, refer to https://github.com/webpack/extract-text-webpack-plugin for the usage example
at Object.module.exports.pitch (c:\Users\art\AppData\Roaming\npm\node_modules\nuxt\node_modules\extract-text-webpack-plugin\loader.js:26:9)
@ ./.nuxt/components/nuxt-error.vue 3:0-446
@ C:/Users/art/AppData/Roaming/npm/~/nuxt/~/babel-loader/lib?{"plugins":["transform-async-to-generator","transform-runtime"],"presets":[["es2015",{"modules":false}],"stage-2"],"cacheDirectory":false}!c:/Users/art/AppData/Roaming/npm/~/nuxt/~/vue-loader/lib/selector.js?type=script&index=0!./.nuxt/components/nuxt.vue
@ ./.nuxt/components/nuxt.vue
@ ./.nuxt/index.js
@ ./.nuxt/client.js
Windows 10, npm 3.10.10, node 6.9.5
Some other person raport this problem on the chat today too. I am not sure if it is a bug or not.
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c240">#c240</a>)</em></sub></div>