Skip to content

"useEffect" is not exported by "node_modules/react/index.js" #2641

Discussion options

You must be logged in to vote

Managed to get the build to work by changing the astro config to

import { defineConfig } from "astro/config";
import react from "@astrojs/react";
import tailwind from "@astrojs/tailwind";
import sitemap from "@astrojs/sitemap";
import robotsTxt from "astro-robots-txt";

// https://astro.build/config
export default defineConfig({
  output: "static",
  build: {
    format: "file",
    emptyOutDir: true,
  },
  vite: {
    build: {
      commonjsOptions: {
        include: [/node_modules/],
        exclude: [],
      },
      modulePreload: true,
      minify: false,
      sourcemap: true,
    },
    logLevel: "info",
    ssr: {
      noExternal: ["@react-three/fiber", "@react-three/drei", "…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by dbritto-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2640 on July 10, 2024 13:31.