Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Payload fails to compile after updating from beta-87 to 3.0.2

default discord avatar
joelcoreylast year
2
Build Error
Next.js (15.0.3)

Failed to compile
./src/app/(payload)/admin/importMap.js:3:1

Module not found: Package path ./generateComponentMap is not exported from package /home/joel/dev/payload-bigtrashpanda/node_modules/@payloadcms/richtext-lexical (see exports field in /home/joel/dev/payload-bigtrashpanda/node_modules/@payloadcms/richtext-lexical/package.json)
  1 | import { RichTextCell as RichTextCell_0 } from '@payloadcms/richtext-lexical/client'
  2 | import { RichTextField as RichTextField_1 } from '@payloadcms/richtext-lexical/client'
> 3 | import { getGenerateComponentMap as getGenerateComponentMap_2 } from '@payloadcms/richtext-lexical/generateComponentMap'
    | ^
  4 | import { InlineToolbarFeatureClient as InlineToolbarFeatureClient_3 } from '@payloadcms/richtext-lexical/client'
  5 | import { HorizontalRuleFeatureClient as HorizontalRuleFeatureClient_4 } from '@payloadcms/richtext-lexical/client'
  6 | import { UploadFeatureClient as UploadFeatureClient_5 } from '@payloadcms/richtext-lexical/client'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:


{
  "name": "payload-bigtrashpanda",
  "version": "1.0.0",
  "description": "A CMS powered by Payload 3.0",
  "private": true,
    "scripts": {
    "dev": "cross-env NODE_OPTIONS=\"${NODE_OPTIONS} --no-deprecation\" next dev",
    "devturbo": "pnpm dev --turbo",
    "devsafe": "rm -rf .next && pnpm dev",
    "build": "cross-env NODE_OPTIONS=--no-deprecation next build",
    "start": "cross-env NODE_OPTIONS=--no-deprecation next start",
    "lint": "cross-env NODE_OPTIONS=--no-deprecation next lint",
    "ci": "payload migrate && pnpm build",
    "payload": "payload",
    "generate:types": "payload generate:types",
    "generate:schema": "payload-graphql generate:schema",
    "standalone-script": "payload run ./src/scripts/standalone-script.ts",
    "generate:importmap": "payload generate:importmap"
  },
  "engines": {
    "node": "^18.20.2 || >=20.6.0"
  },
  "dependencies": {
    "@payloadcms/db-mongodb": "3.0.2",
    "@payloadcms/next": "3.0.2",
    "@payloadcms/richtext-lexical": "3.0.2",
    "@payloadcms/storage-s3": "3.0.2",
    "payload": "3.0.2",
    "babel-plugin-react-compiler": "^0.0.0-experimental-592953e-20240517",
    "cross-env": "^7.0.3",
    "graphql": "^16.8.2",
    "next": "15.0.3",
    "react": "19.0.0-rc.1",
    "react-dom": "19.0.0-rc.1",
    "sharp": "0.32.6"
  },
  "devDependencies": {
    "@types/node": "^20.14.9",
    "@types/react": "npm:types-react@19.0.0-rc.1",
    "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
    "autoprefixer": "^10.4.19",
    "postcss": "^8.4.38",
    "tailwindcss": "^3.4.3",
    "typescript": "^5.4.5"
  },
  "pnpm": {
    "overrides": {
      "@types/react": "npm:types-react@19.0.0-rc.1",
      "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
    }
  },
  "overrides": {
    "@types/react": "npm:types-react@19.0.0-rc.1",
    "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
  }
}
  • discord user avatar
    alessiogr
    last year

    There have been a few breaking changes since beta-87.



    For this specific one to be fixed, simply clear out the importmap file (/src/app/(payload)/admin/importMap.js) and then re-generate it using

    pnpm generate:importmap
  • default discord avatar
    joelcoreylast year
    Unhandled Runtime Error
    
    Error: ServerFunctionsProvider requires a serverFunction prop
    Call Stack
    Fp
    node_modules/@payloadcms/ui/dist/exports/client/index.js (48:94363)
    Next.js


    Should I just remake the project and copy in the collections and stuff? Not the end of the world to do so.



    Looks like in my case the latest Node using NVM and a fresh install of Payload using pnpm is the way to go. I will be manually transferring stuff over tomorrow.

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.