framework icon indicating copy to clipboard operation
framework copied to clipboard

Unable to use webpack

Open franzos opened this issue 3 years ago • 1 comments

Environment

Nuxt project info: 00:21:10


  • Operating System: Linux
  • Node Version: v14.19.3
  • Nuxt Version: 3.0.0
  • Nitro Version: 1.0.0
  • Package Manager: [email protected]
  • Builder: webpack
  • User Config: builder
  • Runtime Modules: -
  • Build Modules: -

Reproduction

Setup

npx nuxi init nuxt-app
cd nuxt-app
npm install && npm install webpack @nuxt/webpack-builder

Enable webpack:

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
    builder: 'webpack',
})

Describe the bug

I'm unable to use webpack in a default install.

Additional context

No response

Logs

> nuxt build

Nuxi 3.0.0                                                                                                                                                                                                                            00:20:07
Nuxt 3.0.0 with Nitro 1.0.0                                                                                                                                                                                                           00:20:07

 ERROR  Nuxt build error                                                                                                                                                                                                              00:20:10

  Module not found: Error: Can't resolve '#build/paths.mjs' in 'node_modules/nuxt/dist/app'
  
  ERROR in ./node_modules/nuxt/dist/app/entry.mjs 5:0-20
  Module not found: Error: Can't resolve '#build/css' in 'node_modules/nuxt/dist/app'
  
  ERROR in ./node_modules/nuxt/dist/app/entry.mjs 6:0-38
  Module not found: Error: Can't resolve '#build/plugins' in 'node_modules/nuxt/dist/app'
  
  ERROR in ./node_modules/nuxt/dist/app/entry.mjs 7:0-54
  Module not found: Error: Can't resolve '#build/root-component.mjs' in 'node_modules/nuxt/dist/app'
  
  ERROR in ./node_modules/nuxt/dist/app/entry.mjs 8:0-51
  Module not found: Error: Can't resolve '#build/nuxt.config.mjs' in 'node_modules/nuxt/dist/app'
  
  client compiled with 5 errors

franzos avatar Nov 23 '22 00:11 franzos