I have been successful with building an Astro based website by deploying through Cloudflare pages. Since this morning I am getting the following error when building the website. I thought of updating “astro-icon” package to its latest version, however, it is already the latest version.
Here is the error message:
<code>00:22:10.397 4:22:10 AM [vite] Error when evaluating SSR module /opt/buildhome/repo/astro.config.ts: failed to import "astro-icon"
00:22:10.398 |- file:///opt/buildhome/repo/node_modules/.pnpm/@[email protected]/node_modules/@iconify/tools/lib/svg/index.mjs:1
00:22:10.398 import cheerio from 'cheerio';
00:22:10.398 SyntaxError: The requested module 'cheerio' does not provide an export named 'default'
00:22:10.399 at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
00:22:10.399 at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)
00:22:10.399 [astro] Unable to load your Astro config
00:22:10.727 The requested module 'cheerio' does not provide an export named 'default'
00:22:10.727 Stack trace:
00:22:10.727 at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
00:22:10.863 Failed: Error while executing user command. Exited with error code: 1
00:22:10.872 Failed: build command exited with code: 1
00:22:11.796 Failed: error occurred while running build command
</code>
<code>00:22:10.397 4:22:10 AM [vite] Error when evaluating SSR module /opt/buildhome/repo/astro.config.ts: failed to import "astro-icon"
00:22:10.398 |- file:///opt/buildhome/repo/node_modules/.pnpm/@[email protected]/node_modules/@iconify/tools/lib/svg/index.mjs:1
00:22:10.398 import cheerio from 'cheerio';
00:22:10.398 SyntaxError: The requested module 'cheerio' does not provide an export named 'default'
00:22:10.399 at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
00:22:10.399 at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)
00:22:10.399 [astro] Unable to load your Astro config
00:22:10.727 The requested module 'cheerio' does not provide an export named 'default'
00:22:10.727 Stack trace:
00:22:10.727 at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
00:22:10.863 Failed: Error while executing user command. Exited with error code: 1
00:22:10.872 Failed: build command exited with code: 1
00:22:11.796 Failed: error occurred while running build command
</code>
00:22:10.397 4:22:10 AM [vite] Error when evaluating SSR module /opt/buildhome/repo/astro.config.ts: failed to import "astro-icon"
00:22:10.398 |- file:///opt/buildhome/repo/node_modules/.pnpm/@[email protected]/node_modules/@iconify/tools/lib/svg/index.mjs:1
00:22:10.398 import cheerio from 'cheerio';
00:22:10.398 SyntaxError: The requested module 'cheerio' does not provide an export named 'default'
00:22:10.399 at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
00:22:10.399 at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)
00:22:10.399 [astro] Unable to load your Astro config
00:22:10.727 The requested module 'cheerio' does not provide an export named 'default'
00:22:10.727 Stack trace:
00:22:10.727 at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
00:22:10.863 Failed: Error while executing user command. Exited with error code: 1
00:22:10.872 Failed: build command exited with code: 1
00:22:11.796 Failed: error occurred while running build command