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

The library does not work with ssr deno server #52

Closed
mrabtikhalid opened this issue Aug 25, 2022 · 4 comments
Closed

The library does not work with ssr deno server #52

mrabtikhalid opened this issue Aug 25, 2022 · 4 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@mrabtikhalid
Copy link

mrabtikhalid commented Aug 25, 2022

Hello
This issue is related to #35
I have an astro project with deno server, and when dev processing, the project works properly without any compile error,
But when compiling to build (npm run build), it gives me the folowing error

> npm run build

> @example/basics@0.0.1 build
> astro build

07:16:14 [build] output target: server
07:16:14 [build] Collecting build info...
07:16:14 [build] Completed in 22ms.
07:16:14 [build] Building server entrypoints...
[commonjs--resolver] Cannot bundle Node.js built-in "os" imported from "node_modules\svgo\lib\svgo-node.js". Consider disabling ssr.noExternal or remove the built-in dependency.
file: ..../node_modules/svgo/lib/svgo-node.js
 error   Cannot bundle Node.js built-in "os" imported from "node_modules\svgo\lib\svgo-node.js". Consider disabling ssr.noExternal or remove the built-in dependency.
  File:
  ..../node_modules/svgo/lib/svgo-node.js

because its based on node js libraries, i tried to found some alertnatives with native javascript or works on deno, but my knowledge is not that good .
any help or hints ? i can contribute with a PR to make it depends on pure javascript
thanks in advance

@stramel
Copy link
Collaborator

stramel commented Oct 20, 2022

This definitely seems related to #25. I'm not very familiar with Deno but switching to the browser version of svgo seems like it might resolve the issue temporarily at least.

@stramel stramel added bug Something isn't working help wanted Extra attention is needed labels Oct 20, 2022
@stramel
Copy link
Collaborator

stramel commented Oct 24, 2022

Will be working on SSR support as part of the next release.

@demiro
Copy link

demiro commented Oct 25, 2022

when is the next release coming out?
coz I am having problems when trying to build astro (with node)

 error   [astro-icon] Unable to load icon "mdi:account"!
  Error: Unknown builtin plugin "cleanupIDs" specified.
Error: [astro-icon] Unable to load icon "mdi:account"!
Error: Unknown builtin plugin "cleanupIDs" specified.

and I do have svgo set in vite ssr

vite: { ssr: { external: ["svgo"], }, },

@stramel
Copy link
Collaborator

stramel commented Oct 26, 2022

I'm going to close this in favor of #35 since both are related to SSR support. Please follow along in there.

@stramel stramel closed this as completed Oct 26, 2022
@stramel stramel added duplicate This issue or pull request already exists and removed help wanted Extra attention is needed labels Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants