-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
[vite] Error when evaluating SSR module D:\VSCODE\astro-blog\astro.config.mjs: failed to import "astro-icon" #232
Comments
Debugging Info: I ran into this after running a pnpm upgrade. When I updated the versions in my package.json manually, this issue doesn't arise. Looking at the lockfile, it seems Astro Icon uses |
I updated to '@iconify/[email protected]' and cheerio is on 1.0.0...but I still get the same error: This happens when building in Netlify. But it builds successfully locally. |
Until this gets fixed, I was able to temporarily fix my builds by forcing |
This should be fixed in 1.1.1 |
Confirmed on my side. Thanks! |
What version of
astro-icon
are you using?"astro-icon": "^1.1.0"
Astro Info
If this issue only occurs in one browser, which browser is a problem?
Chrome
Describe the Bug
PS D:\VSCODE\astro-blog> npm run dev
17:52:50 [vite] Error when evaluating SSR module D:\VSCODE\astro-blog\astro.config.mjs: failed to import "astro-icon"
|- file:///D:/VSCODE/astro-blog/node_modules/astro-icon/node_modules/@iconify/tools/lib/svg/index.mjs:1
import cheerio from 'cheerio';
^^^^^^^
SyntaxError: The requested module 'cheerio' does not provide an export named 'default'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:134:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:217:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
at async nodeImport (file:///D:/VSCODE/astro-blog/node_modules/vite/dist/node/chunks/dep-NjL7WTE1.js:52928:15)
at async ssrImport (file:///D:/VSCODE/astro-blog/node_modules/vite/dist/node/chunks/dep-NjL7WTE1.js:52786:16)
at async eval (D:/VSCODE/astro-blog/astro.config.mjs:4:31)
at async instantiateModule (file:///D:/VSCODE/astro-blog/node_modules/vite/dist/node/chunks/dep-NjL7WTE1.js:52844:5)
[astro] Unable to load your Astro config
The requested module 'cheerio' does not provide an export named 'default'
Stack trace:
at ModuleJob._instantiate (node:internal/modules/esm/module_job:134:21)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
at async ssrImport (file:///D:/VSCODE/astro-blog/node_modules/vite/dist/node/chunks/dep-NjL7WTE1.js:52786:16)
at async instantiateModule (file:///D:/VSCODE/astro-blog/node_modules/vite/dist/node/chunks/dep-NjL7WTE1.js:52844:5)
What's the expected result?
PS D:\VSCODE\astro-blog> npm run dev
17:52:50 [vite] Error when evaluating SSR module D:\VSCODE\astro-blog\astro.config.mjs: failed to import "astro-icon"
|- file:///D:/VSCODE/astro-blog/node_modules/astro-icon/node_modules/@iconify/tools/lib/svg/index.mjs:1
import cheerio from 'cheerio';
^^^^^^^
SyntaxError: The requested module 'cheerio' does not provide an export named 'default'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:134:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:217:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
at async nodeImport (file:///D:/VSCODE/astro-blog/node_modules/vite/dist/node/chunks/dep-NjL7WTE1.js:52928:15)
at async ssrImport (file:///D:/VSCODE/astro-blog/node_modules/vite/dist/node/chunks/dep-NjL7WTE1.js:52786:16)
at async eval (D:/VSCODE/astro-blog/astro.config.mjs:4:31)
at async instantiateModule (file:///D:/VSCODE/astro-blog/node_modules/vite/dist/node/chunks/dep-NjL7WTE1.js:52844:5)
[astro] Unable to load your Astro config
The requested module 'cheerio' does not provide an export named 'default'
Stack trace:
at ModuleJob._instantiate (node:internal/modules/esm/module_job:134:21)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
at async ssrImport (file:///D:/VSCODE/astro-blog/node_modules/vite/dist/node/chunks/dep-NjL7WTE1.js:52786:16)
at async instantiateModule (file:///D:/VSCODE/astro-blog/node_modules/vite/dist/node/chunks/dep-NjL7WTE1.js:52844:5)
Link to Minimal Reproducible Example
no
The text was updated successfully, but these errors were encountered: