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.

When building buildAssetsDir is duplicated /_nuxt/_nuxt/

See original GitHub issue

Environment

Nuxt CLI v3.0.0-rc.8 17:04:46

RootDir: /app 17:04:52 Nuxt project info: 17:04:52


  • Operating System: Linux
  • Node Version: v14.20.0
  • Nuxt Version: 3.0.0-rc.4
  • Package Manager: yarn@1.22.19
  • Builder: vite
  • User Config: publicRuntimeConfig, srcDir, css, modules, app
  • Runtime Modules: @nuxtjs/tailwindcss@5.3.2, @pinia/nuxt@0.4.1
  • Build Modules: -

Reproduction

Difficult to provide as we’re experimenting trying to find a solution, so our env might change.

Describe the bug

When we attempt to build the site, the buildAssetsDir is duplicated. eg. Files that should be in .output/public/_nuxt are instead in output/public/_nuxt/_nuxt

It then attempts to load the files in _nuxt/ so returns 404s. Any attempt to manually copy the files from /_nuxt/_nuxt/ into _nuxt/ has no affect.

We have tried the following in nuxt.config.ts

  • Changing public path, but did nothing

build: { publicPath: ‘/_another/’ }

  • changing buildAssetsDir with no affect

build: { buildAssetsDir: ‘/_another/’ }

  • changing buildAssetsDir in app build: { buildAssetsDir: ‘/_another/’ }

that one worked, but created the same problem on files now being in .output/public/_another/_another/

Additional context

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Aareksiocommented, Aug 25, 2022

Could you please update to latest rc and see if the error persists? You are also using yarn@1.x, a lot of factors to consider. Unless you manage to provide minimal reproduction (create here) or someone from the team correctly guesses what’s the issue, it may be very hard to debug and fix.

0reactions
xiaojieajiecommented, Sep 2, 2022

Thank you so much

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuxt build directory
The .nuxt directory is the so-called "build directory". It is dynamically generated and hidden by default. Inside the directory you can find automatically ......
Read more >
NUXT Duplicating Styles - vue.js - Stack Overflow
Within my NUXT project it seems that CSS is being duplicated, not only on individual components, but when compiled duplicates styles from my ......
Read more >
Top 5 @nuxt/utils Code Examples - Snyk
To help you get started, we've selected a few @nuxt/utils examples, based on popular ways it is used in public projects. Secure your...
Read more >
Nuxt.js cheat sheet - Christopher Kade
Info: To avoid duplicated meta tags when used in child component, set up an unique identifier with the hid key for your meta...
Read more >
Asset Management - webpack
As of webpack 5, using the built-in Asset Modules we can easily ... For the next guides we won't be using all the...
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