You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
create a new project with pnpm create turbo@latest -e https://github.com/t3-oss/create-t3-turbo on windows.
Setup env variables.
Run pnpm dev in Windows Powershell.
Creating the following error:
@acme/nextjs:dev: node:internal/modules/cjs/loader:1144
@acme/nextjs:dev: const err = new Error(message);
@acme/nextjs:dev: ^
@acme/nextjs:dev:
@acme/nextjs:dev: Error: Cannot find module './src/env'
@acme/nextjs:dev: Require stack:
@acme/nextjs:dev: - \C:\Users\myWindowsUser\dev\playground\test\apps\nextjs\next.config.js
@acme/nextjs:dev: at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
@acme/nextjs:dev: at C:\Users\myWindowsUser\dev\playground\test\node_modules\next\dist\server\require-hook.js:55:36
@acme/nextjs:dev: at Function.resolve (node:internal/modules/helpers:187:19)
@acme/nextjs:dev: at _resolve (C:\Users\myWindowsUser\dev\playground\test\node_modules\jiti\dist\jiti.js:1:251148)
@acme/nextjs:dev: at jiti (C:\Users\myWindowsUser\dev\playground\test\node_modules\jiti\dist\jiti.js:1:253746)
@acme/nextjs:dev: at file:///C:/Users/myWindowsUser/dev/playground/test/apps/nextjs/next.config.js:11:1
@acme/nextjs:dev: at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
@acme/nextjs:dev: at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
@acme/nextjs:dev: at async importModuleDynamicallyWrapper (node:internal/vm/module:431:15)
@acme/nextjs:dev: at async loadConfig (C:\Users\myWindowsUser\dev\playground\test\node_modules\next\dist\server\config.js:706:36) {
@acme/nextjs:dev: code: 'MODULE_NOT_FOUND',
@acme/nextjs:dev: requireStack: [
@acme/nextjs:dev: '\C:\Users\myWindowsUser\dev\playground\test\apps\nextjs\next.config.js'
@acme/nextjs:dev: ]
@acme/nextjs:dev: }
@acme/nextjs:dev:
@acme/nextjs:dev: Node.js v20.11.0
@acme/nextjs:dev: ELIFECYCLE Command failed with exit code 1.
@acme/nextjs:dev: ELIFECYCLE Command failed with exit code 1.
Additional information
Running it with WSL2 is a working workaround.
I already fixed it locally and would love to make my first contribution to this project.
My fix:
let path = new URL(import.meta.url).pathname;
if (process.platform === "win32") {
path = path.replace(/^\/(\w):/, "$1:");
}
const jiti = _jiti(path);
The text was updated successfully, but these errors were encountered:
Provide environment information
System:
OS: Windows 11 10.0.22631
CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor
Memory: 13.21 GB / 31.93 GB
Binaries:
Node: 20.11.0 - C:\Program Files\nodejs\node.EXE
npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
pnpm: 8.15.1 - ~\AppData\Roaming\npm\pnpm.CMD
Describe the bug
_jiti(new URL(import.meta.url).pathname)
fails on windows.Link to reproduction
https://github.com/Cuhadari-Deniz/create-t3-turbo-issue-jiti-windows-compatibility
To reproduce
create a new project with
pnpm create turbo@latest -e https://github.com/t3-oss/create-t3-turbo
on windows.Setup env variables.
Run
pnpm dev
in Windows Powershell.Creating the following error:
Additional information
Running it with WSL2 is a working workaround.
I already fixed it locally and would love to make my first contribution to this project.
My fix:
The text was updated successfully, but these errors were encountered: