zankhq / astros

Template with astro, tailwind and alpinejs
https://astros.zank.studio
GNU General Public License v3.0
202 stars 68 forks source link

Cloudflare Pages deployment failing #43

Closed arunthachi closed 9 months ago

arunthachi commented 10 months ago

Hi - I am deploying the repo as is into Cloudflare Pages, and I am getting the below error. But in my local it is running fine.

19:21:47.352 | Executing user command: npm run build
-- | --
19:21:48.192 |  
19:21:48.207 | > astros@1.0.1 build
19:21:48.207 | > astro build
19:21:48.207 |  
19:21:50.041 | 12:21:50 AM [vite] Pre-transform error: Failed to load url hast-util-to-string (resolved id: hast-util-to-string) in /opt/buildhome/repo/plugins/rehype-autolink-config.ts. Does the file exist?
19:21:50.042 | 12:21:50 AM [vite] Pre-transform error: Failed to load url hastscript (resolved id: hastscript) in /opt/buildhome/repo/plugins/rehype-autolink-config.ts. Does the file exist?
19:21:50.055 | 12:21:50 AM [vite] Error when evaluating SSR module /plugins/rehype-autolink-config.ts: failed to import "hast-util-to-string"
19:21:50.055 | \|- Error: Cannot find module 'hast-util-to-string' imported from '/opt/buildhome/repo/plugins/rehype-autolink-config.ts'
19:21:50.056 | at nodeImport (file:///opt/buildhome/repo/node_modules/.pnpm/vite@5.0.7/node_modules/vite/dist/node/chunks/dep-wTaJK0Jt.js:50234:25)
19:21:50.056 | at ssrImport (file:///opt/buildhome/repo/node_modules/.pnpm/vite@5.0.7/node_modules/vite/dist/node/chunks/dep-wTaJK0Jt.js:50141:30)
19:21:50.056 | at eval (/opt/buildhome/repo/plugins/rehype-autolink-config.ts:3:50)
19:21:50.056 | at instantiateModule (file:///opt/buildhome/repo/node_modules/.pnpm/vite@5.0.7/node_modules/vite/dist/node/chunks/dep-wTaJK0Jt.js:50203:15)
19:21:50.056 |  
19:21:50.056 | 12:21:50 AM [vite] Error when evaluating SSR module /opt/buildhome/repo/astro.config.mjs: failed to import "/plugins/rehype-autolink-config.ts"
19:21:50.056 | \|- Error: Cannot find module 'hast-util-to-string' imported from '/opt/buildhome/repo/plugins/rehype-autolink-config.ts'
19:21:50.056 | at nodeImport (file:///opt/buildhome/repo/node_modules/.pnpm/vite@5.0.7/node_modules/vite/dist/node/chunks/dep-wTaJK0Jt.js:50234:25)
19:21:50.057 | at ssrImport (file:///opt/buildhome/repo/node_modules/.pnpm/vite@5.0.7/node_modules/vite/dist/node/chunks/dep-wTaJK0Jt.js:50141:30)
19:21:50.057 | at eval (/opt/buildhome/repo/plugins/rehype-autolink-config.ts:3:50)
19:21:50.057 | at instantiateModule (file:///opt/buildhome/repo/node_modules/.pnpm/vite@5.0.7/node_modules/vite/dist/node/chunks/dep-wTaJK0Jt.js:50203:15)
19:21:50.057 |  
19:21:50.057 | 12:21:50 AM [vite] Pre-transform error: Failed to load url html-escaper (resolved id: html-escaper) in /opt/buildhome/repo/plugins/rehype-autolink-config.ts. Does the file exist?
19:21:50.057 | [astro] Unable to load your Astro config
19:21:50.057 |  
19:21:50.515 | Cannot find module 'hast-util-to-string' imported from '/opt/buildhome/repo/plugins/rehype-autolink-config.ts'
19:21:50.515 | Stack trace:
19:21:50.515 | at nodeImport (file:///opt/buildhome/repo/node_modules/.pnpm/vite@5.0.7/node_modules/vite/dist/node/chunks/dep-wTaJK0Jt.js:50234:25)
19:21:50.516 | at eval (/opt/buildhome/repo/plugins/rehype-autolink-config.ts:3:50)
19:21:50.679 | Failed: Error while executing user command. Exited with error code: 1
19:21:50.688 | Failed: build command exited with code: 1
19:21:51.659 | Failed: error occurred while running build command

zanhk commented 10 months ago

Hi @arunthachi sorry i missed this issue, does the problem still persist?

zanhk commented 9 months ago

Closing as no updates