Skip to content
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

Astro 3.2: Top-level await is not available in the configured target environment #173

Open
aminya opened this issue Sep 30, 2023 · 0 comments

Comments

@aminya
Copy link

aminya commented Sep 30, 2023

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant