Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running the dev server with Turbo using Next 14 results in errors #1228

Closed
Tim-Ruiterkamp opened this issue Nov 1, 2023 · 1 comment
Closed

Comments

@Tim-Ruiterkamp
Copy link

Issue

I forked the repo and started the dev server using next dev --turbo. This resulted in the following error message:

Error resolving EcmaScript Modules request
unable to resolve module "components" with subpath "/grid/three-items"
It was not possible to find the requested file.
    Parsed request as written in source code: module "components" with subpath "/grid/three-items"
    Path where resolving has started: [project]/app/page.tsx
    Type of request: EcmaScript Modules request
    Import map: No import map entry

Note that this error occurred for all the base paths that were used in the code.

Other

I did not change anything other than adding --turbo to the dev server.

Fix

I fixed it by adding the paths to the tsconfig.json but I am not sure if this issue is experienced by more people. If it is, here is the fix:

tsconfig.json

{
  "compilerOptions": {
  ...standard compiler options
     "baseUrl": "./",
    "paths": {
      "components": ["components/*"],
      "lib": ["lib/*"],
      "pages": ["pages/*"],
      "public": ["public/*"],
      "styles": ["styles/*"]
      // Add more paths as needed
    }
  },
 ... rest of the config
}
@leerob
Copy link
Member

leerob commented Nov 28, 2023

Seems to be working on the latest canary version now!

#1236

@leerob leerob closed this as completed Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants