NickN
Convex Community14mo ago
31 replies
Nick

React quickstart breaks on `npm run dev:frontend`

I ran npm create convex@latest and then npm run dev but I'm getting an error.

% npm run dev:frontend

> my-project@0.0.0 dev:frontend
> vite --open

Port 5173 is in use, trying another one...
Port 5174 is in use, trying another one...

  VITE v5.4.11  ready in 138 ms

  ➜  Local:   http://localhost:5175/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
file:///Users/me/Documents/Code/my-project/tailwind.config.js:77
  plugins: [require("tailwindcss-animate")],
           ^

ReferenceError: require is not defined
    at file:///Users/me/Documents/Code/my-project/tailwind.config.js:77:12
    at ModuleJobSync.runSync (node:internal/modules/esm/module_job:395:35)
    at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:329:47)
    at loadESMFromCJS (node:internal/modules/cjs/loader:1414:24)
    at Module._compile (node:internal/modules/cjs/loader:1547:5)
    at Object..js (node:internal/modules/cjs/loader:1677:16)
    at Module.load (node:internal/modules/cjs/loader:1318:32)
    at Function._load (node:internal/modules/cjs/loader:1128:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:219:24)
    at Module.require (node:internal/modules/cjs/loader:1340:12)
    at require (node:internal/modules/helpers:138:16)
    at /Users/me/Documents/Code/my-project/node_modules/tailwindcss/lib/lib/load-config.js:54:27
    at loadConfig (/Users/me/Documents/Code/my-project/node_modules/tailwindcss/lib/lib/load-config.js:58:6)
    at getTailwindConfig (/Users/me/Documents/Code/my-project/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:71:116)
    at /Users/me/Documents/Code/my-project/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:100:92
    at /Users/me/Documents/Code/my-project/node_modules/tailwindcss/lib/processTailwindFeatures.js:46:11
    at plugins (/Users/me/Documents/Code/my-project/node_modules/tailwindcss/lib/plugin.js:38:69)
    at LazyResult.runOnRoot (/Users/me/Documents/Code/my-project/node_modules/postcss/lib/lazy-result.js:329:16)
    at LazyResult.runAsync (/Users/me/Documents/Code/my-project/node_modules/postcss/lib/lazy-result.js:258:26)
    at LazyResult.async (/Users/me/Documents/Code/my-project/node_modules/postcss/lib/lazy-result.js:160:30)
    at LazyResult.then (/Users/me/Documents/Code/my-project/node_modules/postcss/lib/lazy-result.js:404:17)

Node.js v22.12.0
Was this page helpful?