Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected "meta" but found "meta$1" - rollup error with dynamic imports #14650

Closed
lucassimines opened this issue Aug 19, 2022 · 4 comments · Fixed by nuxt/framework#6789 or nuxt/framework#8536

Comments

@lucassimines
Copy link

Environment


  • Operating System: Darwin
  • Node Version: v16.14.2
  • Nuxt Version: 3.0.0-rc.8-27681070.ad63817
  • Package Manager: npm@8.8.0
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://codesandbox.io/s/delicate-hill-p8707x?file=/views/subpages/%5Bid%5D.vue

Describe the bug

If I call more than one Lazy component between different folders, the Nuxt build will throw an error.

Additional context

To reproduce, run $ npm run build

Logs

Expected "meta" but found "meta$1"
11717|  };
11718|
11719|  defineAsyncComponent(() => __vitePreload(() => import('./Text.100e7f97.js'),true?"__VITE_PRELOAD__":void 0,import.meta$1.url));
   |                        ^
11720|  const meta$1 = undefined;
11721|
@lucassimines
Copy link
Author

@danielroe the build error I mentioned yesterday

@simirka
Copy link

simirka commented Sep 5, 2022

@danielroe
Please take a read
nuxt/framework#6789 (comment)

@danielroe danielroe reopened this Sep 6, 2022
@danielroe
Copy link
Member

This is still reproducible (although less frequently) - thanks @simirka for reproduction: https://codesandbox.io/s/suspicious-cherry-pqq6ci?file=/pages/test.vue.

Initially I think it's a rollup or vite bug.

@simirka
Copy link

simirka commented Sep 6, 2022

@danielroe You welcome) I haven't found a quick fix, but yep it seems like rollup, something related to syntax.
But the thing that it's working on rc.8.

@danielroe danielroe changed the title Nuxt won't build if using Lazy components Expected "meta" but found "meta$1" - rollup error with dynamic imports Sep 19, 2022
@danielroe danielroe self-assigned this Oct 27, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment