Skip to content
This repository was archived by the owner on Jun 24, 2023. It is now read-only.
This repository was archived by the owner on Jun 24, 2023. It is now read-only.

Error when using @vitejs/plugin-react-swc #19

Description

@krispya

I get the following error when attempting to start up the editor:
image

My vite.config:

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import { r3f } from "@react-three/editor/vite";

// https://vitejs.dev/config/
export default defineConfig((env) => ({
  plugins: [env.command === "build" ? react() : r3f()],
}));

I am on Windows.
I am using Vite v4.0.0.

Activity

  1. krispya commented on Dec 20, 2022

    @krispya
    MemberAuthor

    I confirmed that vite v4 does work. The problem is using @vitejs/plugin-react-swc insead of @vitejs/plugin-react.

  2. changed the title [-]Get vite error when attempting to start up editor[/-] [+]Error when using `@vitejs/plugin-react-swc`[/+] on Dec 20, 2022
  3. nksaraf commented on Dec 21, 2022

    @nksaraf
    Collaborator

    So the earlier error was vite 4 + swc and works with vite 4 + babel.. did u try with vite 3 as well?

  4. krispya commented on Dec 21, 2022

    @krispya
    MemberAuthor

    I did not, I can try this configuration later.

  5. nksaraf commented on Dec 27, 2022

    @nksaraf
    Collaborator

    vitejs/vite#9986 could be related to this

  6. wanghqwe commented on Feb 16, 2023

    @wanghqwe
    resolve: {
       preserveSymlinks: true,
    },
    

    work for me

  7. prjwlbadwe commented on Feb 18, 2023

    @prjwlbadwe
    1. Open Command Palette: Command + Shift + P.
    2. Search TypeScript: Restart TS server.
    3. Press Enter.
  8. AlejandroWogelman commented on May 14, 2023

    @AlejandroWogelman

    I confirmed that vite v4 does work. The problem is using @vitejs/plugin-react-swc insead of @vitejs/plugin-react.

    Thanks!! I had the following error "[vite] Internal server error: Bindings not found." Changing @vitejs/plugin-react-swc to @vitejs/plugin-react solved it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions