Skip to content

[BUG]: react-vite #301

@jgabriele

Description

@jgabriele

Describe the bug
I couldn't launch a fresh clone from today because of react-vite issue with the yarn && yarn dev command

[vite] Internal server error: Failed to resolve import "react-is" from "node_modules/.vite/deps/recharts.js?v=36c1ad38". Does the file exist?
  Plugin: vite:import-analysis
  File: /.../shadcn-admin/node_modules/.vite/deps/recharts.js?v=36c1ad38:6:28
  4  |  import { t as require_with_selector$1 } from "./with-selector-fJhYPGBO.js";
  5  |  import { clsx } from "./clsx.js";
  6  |  import { isFragment } from "react-is";
     |                              ^
  7  |  //#region node_modules/recharts/es6/util/excludeEventProps.js
  8  |  var import_react = /* @__PURE__ */ __toESM(require_react());
      at TransformPluginContext._formatLog (file:///.../shadcn-admin/node_modules/vite/dist/node/chunks/node.js:30352:39)
      at TransformPluginContext.error (file:///.../shadcn-admin/node_modules/vite/dist/node/chunks/node.js:30349:14)
      at normalizeUrl (file://.../shadcn-admin/node_modules/vite/dist/node/chunks/node.js:27631:18)
      at async file:///.../shadcn-admin/node_modules/vite/dist/node/chunks/node.js:27694:30
      at async Promise.all (index 5)
      at async TransformPluginContext.transform (file:///.../shadcn-admin/node_modules/vite/dist/node/chunks/node.js:27662:4)
      at async EnvironmentPluginContainer.transform (file:///.../shadcn-admin/node_modules/vite/dist/node/chunks/node.js:30141:14)
      at async loadAndTransform (file:///.../shadcn-admin/node_modules/vite/dist/node/chunks/node.js:24489:26)
      at async viteTransformMiddleware (file:///.../shadcn-admin/node_modules/vite/dist/node/chunks/node.js:24283:20) (x2)

Running yarn add react-is before yarn dev works

To Reproduce
Steps to reproduce the behavior:

  1. Git clone the repo
  2. Run yarn && yarn dev
  3. See error

Expected behavior
The app launches with a simple yarn followed by yarn dev

Screenshots
N/A

Additional context
Node 22 on Mac OS Sequoia

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions