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

🐛 BUG: @astrojs/image build fails with 'pathToFileURL' is not exported by __vite-browser-external #4041

Closed
1 task done
nicolabovolato opened this issue Jul 25, 2022 · 0 comments · Fixed by #4048
Closed
1 task done
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) pkg: image Related to the `@astrojs/image` package (scope)

Comments

@nicolabovolato
Copy link

What version of astro are you using?

1.0.0-beta.73

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Windows

Describe the Bug

npm run dev works fine
Running astro build fails with the following error:

error   'pathToFileURL' is not exported by __vite-browser-external, imported by node_modules/@astrojs/image/dist/vite-plugin-astro-image.js
  File:
    /sandbox/node_modules/@astrojs/image/dist/vite-plugin-astro-image.js
  Code:
    1: import fs from "fs/promises";
    2: import slash from "slash";
    3: import { pathToFileURL } from "url";

Link to Minimal Reproducible Example

https://codesandbox.io/s/astrojs-image-bug-be59bu

Participation

  • I am willing to submit a pull request for this issue.
@natemoo-re natemoo-re added the pkg: image Related to the `@astrojs/image` package (scope) label Jul 25, 2022
@tony-sull tony-sull self-assigned this Jul 25, 2022
@tony-sull tony-sull added - P4: important Violate documented behavior or significantly impacts performance (priority) s1-small labels Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) pkg: image Related to the `@astrojs/image` package (scope)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants