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.

Build Error: [rollup-plugin-dynamic-import-variables] Unexpected token

See original GitHub issue

⚠️ IMPORTANT ⚠️ Please do not ignore this template. If you do, your issue will be closed immediately.

Describe the bug

can no build this project

Reproduction

https://github.com/HenryWong-fe/vite-project

System Info

  • vite version: ^2.0.0
  • Operating System: mac os 10.15.4
  • Node version: v14.15.1
  • Package manager (npm/yarn/pnpm) and version: npm 6.14.8

Logs (Optional if provided reproduction)

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:18 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
DhvanilPatelcommented, Apr 21, 2021

I’m facing the same issue too while running npm run build

3reactions
nstuyvesantcommented, Jun 13, 2021

If you happen to be running into this with Svelte, a workaround was suggested here. I was getting build errors on .svelte pages that have a style tag and use an environmental variable via import.meta.env.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"[rollup-plugin-dynamic-import-variables] Unexpected token ...
I've make a simple GSAP and ScrollTrigger animation for my website, but when I build it with Vite JS (which uses rollup to...
Read more >
Production Build [rollup-plugin-dynamic-import-variables ...
I'm facing one issue on production build only on netlify. If I execute production build in my local it's works perfect. Here is...
Read more >
0 1 "[rollup-plugin-dynamic-import-variables] Unexpected ...
I am building vite js app (click here to download code) and when I try and build with the command: npm run build....
Read more >
Rollup-plugin-dynamic-import-variables - npm.io
This glob pattern is evaluated during the build, and any files found are added to the rollup bundle. At runtime, the correct import...
Read more >
vite-plugin-dynamic-import - npm
Enhance Vite builtin dynamic import. Latest version: 1.2.4, last published: a month ago. Start using vite-plugin-dynamic-import in your ...
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