Nuxt.js: css-loader causes error

Created on 14 Jun 2019  ยท  1Comment  ยท  Source: nuxt/nuxt.js

Version

v2.8.1

Reproduction link

https://codesandbox.io/s/codesandbox-nuxt-s30jw

Steps to reproduce

  1. Fresh install of nuxt
  2. Add css-loader
  3. yarn build

What is expected ?

Should throw any error.

What is actually happening?

When building

ERROR in ./.nuxt/index.js
Module not found: Error: Can't resolve 'vue-loader' in '../nuxt'
@ ./.nuxt/index.js 11:0-52 193:0-32
@ ./.nuxt/client.js
@ multi ./.nuxt/client.js

ERROR in ./.nuxt/components/nuxt.js
Module not found: Error: Can't resolve 'vue-loader' in '../nuxt' @ ./.nuxt/components/nuxt.js 5:0-41 11:15-24
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi ./.nuxt/client.js

ERROR in ./.nuxt/App.js
Module not found: Error: Can't resolve 'vue-loader' in '../nuxt' @ ./.nuxt/App.js 3:0-56 133:17-28
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi ./.nuxt/client.js

ERROR in ./.nuxt/router.js
Module not found: Error: Can't resolve 'vue-loader' in '../nuxt' @ ./.nuxt/router.js 7:24-9:3
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi ./.nuxt/client.js

ERROR in ./.nuxt/App.js
Module not found: Error: Can't resolve 'vue-loader' in '../nuxt'
@ ./.nuxt/App.js 4:0-47 6:14-23
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi ./.nuxt/client.js

FATAL Nuxt Build Error 16:20:05

at WebpackBundler.webpackCompile (node_modules/@nuxt/webpack/dist/webpack.js:5365:13)
at process._tickCallback (internal/process/next_tick.js:68:7)

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ โœ– Nuxt Fatal Error โ”‚
โ”‚ โ”‚
โ”‚ Error: Nuxt Build Error โ”‚
โ”‚ โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

When dev
Cannot find module './components/nuxt-error.vue'

This might be related to webpack and css-loader tho

This bug report is available on Nuxt community (#c9361)
bug-report

Most helpful comment

CSS loader is already a dependency of Nuxt. a v3 support PR is in the making (#5929)

>All comments

CSS loader is already a dependency of Nuxt. a v3 support PR is in the making (#5929)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maicong picture maicong  ยท  3Comments

danieloprado picture danieloprado  ยท  3Comments

lazycrazy picture lazycrazy  ยท  3Comments

VincentLoy picture VincentLoy  ยท  3Comments

jaredreich picture jaredreich  ยท  3Comments