question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Nuxt build error] builder:webpack

See original GitHub issue

Environment

  • Operating System: Darwin
  • Node Version: v16.14.2
  • Nuxt Version: 3.0.0-rc.3
  • Package Manager: yarn@1.22.4
  • Builder: webpack
  • User Config: builder, css, typescript, runtimeConfig
  • Runtime Modules: -
  • Build Modules: -

Reproduction

Have you met anyone

Describe the bug

default builder vite is ok

Additional context

package: “dependencies”: { “@nuxt/webpack-builder”: “3.0.0-rc.4”, }

Logs

Nuxt CLI v3.0.0-rc.4 20:43:12

ERROR Nuxt build error 20:43:19

at compile (node_modules/@nuxt/webpack-builder/dist/index.mjs:1056:19)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async bundle (node_modules/@nuxt/webpack-builder/dist/index.mjs:988:5)
at async build (node_modules/nuxt/dist/index.mjs:1650:5)
at async Object.invoke (node_modules/nuxi/dist/chunks/build.mjs:41:5)
at async _main (node_modules/nuxi/dist/cli.mjs:46:20)

error Command failed with exit code 1.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
danielroecommented, Jul 9, 2022

You should not need to add that alias as Nuxt adds it for you assuming you have set srcDir in your config.

import { defineNuxtConfig } from 'nuxt';

export default defineNuxtConfig({
  srcDir: 'src',
});
0reactions
weihongyu12commented, Oct 7, 2022

If you use npm to install dependencies, a compilation error will occur. Using yarn will not cause webpack compilation errors

Read more comments on GitHub >

github_iconTop Results From Across the Web

How Can I Solve this Nuxt npm run build error - Stack Overflow
I'm trying to deploy a nuxt app to namecheap following a tutorial I found here, when I run npm run build from the...
Read more >
Nuxt issues. For use in Nuxt 2 (without Bridge), make sure to ...
The only issue was that most Nuxt users weren't able to unleash the full potential of the separation. 17 Builder: webpack User Config:...
Read more >
@nuxt/webpack-builder - npm
Start using @nuxt/webpack-builder in your project by running `npm i @nuxt/webpack-builder`. There is 1 other project in the npm registry ...
Read more >
nuxt - UNPKG
The CDN for nuxt. ... lib/builder/webpack/plugins/vue/server.js",". ... 'function') {\n throw new Error('Module should export a function: ' + src)\n }\n\n ...
Read more >
How I solved and debugged my Webpack issue through trial ...
In order to make it easier to track down errors and warnings, JavaScript offers source maps, ... Next I removed some devServer settings:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found