leerob / site

My site built with Next.js, Tailwind, and Vercel.
https://leerob.com
7.2k stars 1.39k forks source link

It doesn't seem to work locally. #711

Closed YWzzy closed 2 months ago

YWzzy commented 7 months ago

I used bun to install and run. I set local environment variables,ut when I run locolhost: 3000, I get an error.

log: PS E:\React\leerob.io> bun dev $ next dev --turbo ▲ Next.js 14.2.0-canary.40 (turbo)

./node_modules/geist/dist/geistsans_81192321.module.css Error evaluating Node.js code Error: Failed to load external module E:\React\leerob.io/./postcss.config.js: Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file and data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'e:' at externalImport (/turbopack/[turbopack]/shared-node/base-externals-utils.ts:16:11) [E:\React\leerob.io.next\chunks[output]__next_transform_ad1f0f.js:1336:15] [at process.processTicksAndRejections (node:internal/process/taskqueues:95:5)] at async (postcss.config.js.loader.mjs:3:13) [E:\React\leerob.io.next\chunks_0b8f1c._.js:11:13]

./app/global.css Error evaluating Node.js code Error: Failed to load external module E:\React\leerob.io/./postcss.config.js: Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file and data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'e:' at externalImport (/turbopack/[turbopack]/shared-node/base-externals-utils.ts:16:11) [E:\React\leerob.io.next\chunks[output]__next_transform_ad1f0f.js:1336:15] [at process.processTicksAndRejections (node:internal/process/taskqueues:95:5)] at async (postcss.config.js.loader.mjs:3:13) [E:\React\leerob.io.next\chunks_0b8f1c._.js:11:13]

at processIssues (E:\React\leerob.io\node_modules\next\dist\server\dev\turbopack-utils.js:205:15)
at handleRouteType (E:\React\leerob.io\node_modules\next\dist\server\dev\turbopack-utils.js:360:17)
at async Object.ensurePage (E:\React\leerob.io\node_modules\next\dist\server\dev\hot-reloader-turbopack.js:622:17)
at async DevBundlerService.ensurePage (E:\React\leerob.io\node_modules\next\dist\server\lib\dev-bundler-service.js:18:20)
at async DevServer.ensurePage (E:\React\leerob.io\node_modules\next\dist\server\dev\next-dev-server.js:551:9)
at async Object.ensure (E:\React\leerob.io\node_modules\next\dist\server\dev\next-dev-server.js:169:17)
at async DevRouteMatcherManager.matchAll (E:\React\leerob.io\node_modules\next\dist\server\future\route-matcher-managers\dev-route-matcher-manager.js:96:13)
at async DevRouteMatcherManager.match (E:\React\leerob.io\node_modules\next\dist\server\future\route-matcher-managers\default-route-matcher-manager.js:155:26)
at async NextNodeServer.handleCatchallRenderRequest (E:\React\leerob.io\node_modules\next\dist\server\next-server.js:228:31)
at async DevServer.handleRequestImpl (E:\React\leerob.io\node_modules\next\dist\server\base-server.js:807:17)
at async E:\React\leerob.io\node_modules\next\dist\server\dev\next-dev-server.js:339:20
at async Span.traceAsyncFn (E:\React\leerob.io\node_modules\next\dist\trace\trace.js:151:20)
at async DevServer.handleRequest (E:\React\leerob.io\node_modules\next\dist\server\dev\next-dev-server.js:336:24)
at async invokeRender (E:\React\leerob.io\node_modules\next\dist\server\lib\router-server.js:174:21)
at async handleRequest (E:\React\leerob.io\node_modules\next\dist\server\lib\router-server.js:353:24)
at async requestHandlerImpl (E:\React\leerob.io\node_modules\next\dist\server\lib\router-server.js:377:13)
at async Server.requestListener (E:\React\leerob.io\node_modules\next\dist\server\lib\start-server.js:141:13)

○ Compiling /_error ... ✓ Compiled /_error in 3.5s ✓ Compiled /favicon.ico in 169ms

image

GaillardTom commented 7 months ago

Hey, it seems I have been able to fix that bug by renaming the postcss.config.js file to postcss.config.cjs if you want to try!

leerob commented 2 months ago

Moved to a different design which has the new postcss file: https://github.com/leerob/leerob.io/pull/727