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.

PayloadComponent not found in importMap: @payloadcms/storage-s3/client#S3ClientUploadHandler

default discord avatar
ecosse3last year
8

I've updated today to newest Payload v3.25.0 and I get error after enabling

clientUploads

for S3 Storage Adapter. After I disabled it I still have this error. It happens on Vercel only, locally works. Admin panel doesn't even load.



getFromImportMap: PayloadComponent not found in importMap {
  key: '@payloadcms/storage-s3/client#S3ClientUploadHandler',
  PayloadComponent: {
    clientProps: {
      collectionSlug: 'media',
      enabled: false,
      extra: undefined,
      serverHandlerPath: '/storage-s3-generate-signed-url'
    },
    path: '@payloadcms/storage-s3/client#S3ClientUploadHandler'
  },
  schemaPath: ''
} You may need to run the `payload generate:importmap` command to generate the importMap ahead of runtime.


I have checked and

payload generate:importmap

does nothing. Anyone has this issue?

  • default discord avatar
    ritsu0455last year

    The issue is that locally you have s3 storage disabled. This is why

    payload generate:importmap

    doesn't generate

    S3ClientUploadHandler

    .



    On Vercel, you have storage s3 enabled and it expects you to have that (even when you don't use

    clientUploads

    ).



    Can you try to include into your build script


    pnpm generate:importmap

    like


    "build": "pnpm generate:importmap && pnpm build"

    ?

  • default discord avatar
    ecosse3last year
    @423216344302092288

    Thank you, it worked! I have used build script:


    "build": "payload generate:importmap && cross-env NODE_OPTIONS=--no-deprecation next build",
  • default discord avatar
    roastlechonlast year

    i have this issue right now. is there something that is defined locally that determines if s3 storage is enabled?

  • default discord avatar
    dan_31337last year

    I am also seeing this issue. Running

    payload generate:importmap

    just says

    No new imports found, skipping writing import map

    I managed to resolve the issue by downgrading all payload packages to

    3.24.0
  • default discord avatar
    joelcoreylast year

    I also get this error

  • default discord avatar
    afinfo_90914last year

    This worked for me, thanks

  • default discord avatar
    joelcoreylast year

    Same. I am on 3.24 right now. But I don't think this is the right way to go about resolving this.

  • default discord avatar
    simka09977 months ago

    Did you manage to resolve it?

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.