blitz-js / blitz

⚡️ The Missing Fullstack Toolkit for Next.js

Home Page:https://Blitzjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot find module 'next/dist/client/resolve-href'

ardhichoiruddin opened this issue · comments

What is the problem?

When I wanted to run Blitz for the first time from install, there was an error as below:

Paste all your error logs here:

✔ Next.js was successfully patched with a React Suspense fix
✔ Routes manifest was successfully generated
- ready started server on 0.0.0.0:3000, url: http://localhost:3000
- error Failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error
Error: Cannot find module 'next/dist/client/resolve-href'
Require stack:
- /Users/xxxx/Documents/work/myself/blitz-learning/node_modules/@blitzjs/next/dist/index-server.cjs
- /Users/xxxx/Documents/work/myself/blitz-learning/next.config.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at /Users/xxxx/Documents/work/myself/blitz-learning/node_modules/next/dist/server/require-hook.js:189:36
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/xxxx/Documents/work/myself/blitz-learning/node_modules/@blitzjs/next/dist/index-server.cjs:8:21)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
  type: 'Error',
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/xxxx/Documents/work/myself/blitz-learning/node_modules/@blitzjs/next/dist/index-server.cjs',
    '/Users/xxxx/Documents/work/myself/blitz-learning/next.config.js'
  ]
}
error Command failed with exit code 1.

Paste all relevant code snippets here:

PASTE_HERE (leave the ``` marks)

What are detailed steps to reproduce this?

  1. blitz new blitz-learning
  2. cd blitz-learning
  3. yarn
  4. blitz prisma migrate dev
  5. yarn blitz dev

Run blitz -v and paste the output here:

Blitz version: 2.0.5 (global)
Blitz version: 2.0.5 (local)
macOS Sonoma | darwin-x64 | Node: v16.14.2


 Package manager: npm

  System:
    OS: macOS 14.3.1
    CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
    Memory: 99.68 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
  npmPackages:
    @blitzjs/auth: 2.0.5 => 2.0.5 
    @blitzjs/next: 2.0.5 => 2.0.5 
    @blitzjs/rpc: 2.0.5 => 2.0.5 
    @prisma/client: 4.6.1 => 4.6.1 
    blitz: 2.0.5 => 2.0.5 
    next: 13.4.5 => 13.4.5 
    prisma: 4.6.1 => 4.6.1 
    react: 18.2.0 => 18.2.0 
    react-dom: 18.2.0 => 18.2.0 
    typescript: ^4.8.4 => 4.9.5 

Please include below any other applicable logs and screenshots that show your problem:

No response

hey, thanks for the issue @ardhichoiruddin! please upgrade to next.js version > 13.5 to use the latest versions of blitz.

Let me know if that helps.