Astro 3.2: Top-level await is not available in the configured target environment
Opened this issue · 0 comments
aminya commented
This plugin doesn't work anymore in Astro 3.2
✘ [ERROR] Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)
node_modules/.pnpm/astro-imagetools@0.9.0_astro@3.2.0/node_modules/astro-imagetools/utils/runtimeChecks.js:7:21:
7 │ const FindUpModule = await import("find-up"),
╵ ~~~~~
✘ [ERROR] Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)
node_modules/.pnpm/astro-imagetools@0.9.0_astro@3.2.0/node_modules/astro-imagetools/utils/runtimeChecks.js:11:21:
11 │ export const sharp = await (async () => {
╵ ~~~~~
✘ [ERROR] Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)
node_modules/.pnpm/astro-imagetools@0.9.0_astro@3.2.0/node_modules/astro-imagetools/utils/runtimeChecks.js:41:19:
41 │ const configFile = await findUp([
╵ ~~~~~
✘ [ERROR] Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)
node_modules/.pnpm/astro-imagetools@0.9.0_astro@3.2.0/node_modules/astro-imagetools/utils/runtimeChecks.js:47:4:
47 │ ? await import(configFile).catch(async () => await import("/" + configFile))
╵ ~~~~~
✘ [ERROR] Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)
node_modules/.pnpm/astro-imagetools@0.9.0_astro@3.2.0/node_modules/astro-imagetools/plugin/hooks/load.js:11:48:
11 │ const { getLoadedImage, getTransformedImage } = await (sharp
╵ ~~~~~
/media/aminya/Linux/GitHub/aminya-website/node_modules/.pnpm/esbuild@0.18.20/node_modules/esbuild/lib/main.js:1649
let error = new Error(`${text}${summary}`);
^
Error: Build failed with 5 errors:
node_modules/.pnpm/astro-imagetools@0.9.0_astro@3.2.0/node_modules/astro-imagetools/plugin/hooks/load.js:11:48: ERROR: Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)
node_modules/.pnpm/astro-imagetools@0.9.0_astro@3.2.0/node_modules/astro-imagetools/utils/runtimeChecks.js:7:21: ERROR: Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)
node_modules/.pnpm/astro-imagetools@0.9.0_astro@3.2.0/node_modules/astro-imagetools/utils/runtimeChecks.js:11:21: ERROR: Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)
node_modules/.pnpm/astro-imagetools@0.9.0_astro@3.2.0/node_modules/astro-imagetools/utils/runtimeChecks.js:41:19: ERROR: Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)
node_modules/.pnpm/astro-imagetools@0.9.0_astro@3.2.0/node_modules/astro-imagetools/utils/runtimeChecks.js:47:4: ERROR: Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)