Skip to content

Error while trying to build with outDir #264

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

Open
OwOchle opened this issue Jan 29, 2025 · 0 comments
Open

Error while trying to build with outDir #264

OwOchle opened this issue Jan 29, 2025 · 0 comments

Comments

@OwOchle
Copy link

OwOchle commented Jan 29, 2025

What version of astro-icon are you using?

1.1.5

Astro Info

Astro                    v5.1.9
Node                     v23.6.1
System                   Linux (x64)
Package Manager          yarn
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

N/A

Describe the Bug

I can't build the project with outDir astro option. I get this error

18:26:11 [ERROR] [vite] x Build failed in 736ms
[vite]: Rollup failed to resolve import "virtual:astro-icon" from "/home/node/reikiolistique/node_modules/astro-icon/components/Icon.astro".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
  Stack trace:
    at viteWarn (file:///home/node/reikiolistique/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:51220:17)
    at onwarn (file:///home/node/reikiolistique/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:50918:7)
    at Object.logger [as onLog] (file:///home/node/reikiolistique/node_modules/rollup/dist/es/shared/node-entry.js:21329:9)
    at file:///home/node/reikiolistique/node_modules/rollup/dist/es/shared/node-entry.js:20176:26
error Command failed with exit code 1.

What's the expected result?

No error, regular build. The project builds without the outDir option.

Link to Minimal Reproducible Example

Build any project with the option outDir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant