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

Error when upgrading to next@13.5.1 #4221

Closed
julianklumpers opened this issue Sep 20, 2023 · 6 comments · Fixed by #4222
Closed

Error when upgrading to next@13.5.1 #4221

julianklumpers opened this issue Sep 20, 2023 · 6 comments · Fixed by #4222
Assignees
Labels
kind/bug Something isn't working status/done
Projects

Comments

@julianklumpers
Copy link

What is the problem?

When upgrading to the latst next@13.5.1 version, blitz dev no longer works. it works on next@13.4.19

Paste all your error logs here:

@dev: Error: Cannot find module 'next/dist/shared/lib/router/utils/resolve-href'
@dev: Require stack:
@dev: - /Users/.../node_modules/@blitzjs/next/dist/index-server.cjs

Paste all relevant code snippets here:

PASTE_HERE (leave the ``` marks)

What are detailed steps to reproduce this?

  1. init a new blitzjs project
  2. upgrade next to version 13.5.1
  3. npm run dev or yarn dev

Run blitz -v and paste the output here:

Blitz version: 2.0.0-beta.33 (local)
macOS Ventura | darwin-arm64 | Node: v19.6.0


 Package manager: npm

  System:
    OS: macOS 13.2.1
    CPU: (8) arm64 Apple M1
    Memory: 46.23 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 19.6.0 - /var/folders/wd/164vtmpd15155cz8k53cmcm80000gn/T/yarn--1695205755763-0.7193118005894912/node
    Yarn: 1.22.19 - /var/folders/wd/164vtmpd15155cz8k53cmcm80000gn/T/yarn--1695205755763-0.7193118005894912/yarn
    npm: 9.4.0 - /opt/homebrew/bin/npm
  npmPackages:
    @blitzjs/auth: 2.0.0-beta.33 => 2.0.0-beta.33 
    @blitzjs/next: 2.0.0-beta.33 => 2.0.0-beta.33 
    @blitzjs/rpc: 2.0.0-beta.33 => 2.0.0-beta.33 
    @prisma/client: Not Found
    blitz: 2.0.0-beta.33 => 2.0.0-beta.33 
    next: 13.5.1 => 13.5.1 
    prisma: Not Found
    react: ^18.2.0 => 18.2.0 
    react-dom: ^18.2.0 => 18.2.0 
    typescript: ^5.2.2 => 5.2.2 

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

No response

@julianklumpers julianklumpers added kind/bug Something isn't working status/triage labels Sep 20, 2023
@siddhsuresh
Copy link
Member

@julianklumpers , thanks for the issue. Will get this fixed quickly.

@kitze
Copy link

kitze commented Sep 22, 2023

tnx @siddhsuresh . For now I'm patching the index-server.cjs file to use const resolveHref = require('next/dist/client/resolve-href');

@kitze
Copy link

kitze commented Oct 5, 2023

thank you so much @siddhsuresh !

@msert29
Copy link

msert29 commented Oct 14, 2023

@kitze just got stuck with the same error following your zero-to-shipped course 🤣

I resolved it upgrading next to 13.5.2

@jorisck
Copy link

jorisck commented Feb 4, 2024

@kitze just got stuck with the same error following your zero-to-shipped course 🤣

I resolved it upgrading next to 13.5.2

Could you share your package json ? I stuck with the same error for the same course. I don't understnd why

@msert29
Copy link

msert29 commented Mar 7, 2024

{
  "name": "project",
  "version": "1.0.0",
  "scripts": {
    "dev": "blitz dev",
    "build": "blitz build",
    "start": "blitz start",
    "studio": "blitz prisma studio",
    "lint": "eslint --ignore-path .gitignore --ext .js,.ts,.tsx .",
    "test": "vitest run --passWithNoTests",
    "test:watch": "vitest",
    "prepare": "husky install"
  },
  "prisma": {
    "schema": "db/schema.prisma"
  },
  "prettier": {
    "semi": false,
    "printWidth": 100
  },
  "lint-staged": {
    "*.{js,ts,tsx}": [
      "eslint --fix"
    ]
  },
  "dependencies": {
    "@blitzjs/auth": "2.0.5",
    "@blitzjs/next": "2.0.5",
    "@blitzjs/rpc": "2.0.5",
    "@prisma/client": "4.6.1",
    "blitz": "2.0.5",
    "next": "13.5.2",
    "prisma": "4.6.1",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "secure-password": "4.0.0",
    "zod": "3.22.4",
    "formik": "2.4.5"
  },
  "devDependencies": {
    "@next/bundle-analyzer": "12.0.8",
    "@next/env": "13.4.19",
    "@testing-library/jest-dom": "5.16.5",
    "@testing-library/react": "13.4.0",
    "@testing-library/react-hooks": "8.0.1",
    "@types/node": "18.11.9",
    "@types/preview-email": "2.0.1",
    "@types/react": "18.0.25",
    "@typescript-eslint/eslint-plugin": "5.42.1",
    "@vitejs/plugin-react": "2.2.0",
    "eslint": "8.27.0",
    "eslint-config-next": "12.3.1",
    "eslint-config-prettier": "8.5.0",
    "husky": "8.0.2",
    "jsdom": "20.0.3",
    "lint-staged": "13.0.3",
    "prettier": "^2.7.1",
    "prettier-plugin-prisma": "4.4.0",
    "pretty-quick": "3.1.3",
    "preview-email": "3.0.7",
    "typescript": "^4.8.4",
    "vite-tsconfig-paths": "3.6.0",
    "vitest": "0.25.3"
  },
  "private": true
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working status/done
Projects
Development

Successfully merging a pull request may close this issue.

6 participants