Previous build now become failed
I tried to repeat a previously successful deployment but it failed, has anyone experienced something similar?
00:47:34.309 5:47:34 PM [vite] (ssr) Error when evaluating SSR module /opt/buildhome/repo/astro.config.ts:
00:47:34.309 |- Error [ERR_REQUIRE_ESM]: require() of ES Module /opt/buildhome/repo/node_modules/.pnpm/[email protected]/node_modules/readdirp/index.js from /opt/buildhome/repo/node_modules/.pnpm/[email protected]/node_modules/chokidar/index.js not supported.
00:47:34.310 /opt/buildhome/repo/node_modules/.pnpm/[email protected]/node_modules/readdirp/index.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.
00:47:34.310 Instead rename /opt/buildhome/repo/node_modules/.pnpm/[email protected]/node_modules/readdirp/index.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in /opt/buildhome/repo/node_modules/.pnpm/[email protected]/node_modules/readdirp/package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).
00:47:34.309 5:47:34 PM [vite] (ssr) Error when evaluating SSR module /opt/buildhome/repo/astro.config.ts:
00:47:34.309 |- Error [ERR_REQUIRE_ESM]: require() of ES Module /opt/buildhome/repo/node_modules/.pnpm/[email protected]/node_modules/readdirp/index.js from /opt/buildhome/repo/node_modules/.pnpm/[email protected]/node_modules/chokidar/index.js not supported.
00:47:34.310 /opt/buildhome/repo/node_modules/.pnpm/[email protected]/node_modules/readdirp/index.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.
00:47:34.310 Instead rename /opt/buildhome/repo/node_modules/.pnpm/[email protected]/node_modules/readdirp/index.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in /opt/buildhome/repo/node_modules/.pnpm/[email protected]/node_modules/readdirp/package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).
2 Replies
Hey, this is now fixed - https://www.cloudflarestatus.com/incidents/flcv5ff4xbx8
if you re-run it should be good