Webpack dosn't resolve index files

default discord avatar
livog
last month
3

I hade to switch back to webpack as vite hade a bug with cloud storage plugin, but now webpack dosnt seem to resolve /index.ts files or any index file for that matter. So just doing

npx create-payload-app

and choosing the payload website, and just running

pnpm run build

fails when trying to resolve:

Error: Cannot find module 'payload/components/rich-text'

and this is a index.tsx file.



Am I doing something wrong? Is there a workaround for now? Is others getting the same?

  • discord user avatar
    denolfe
    Payload Team
    last month

    I'm not able to reproduce this. Can you get the exact versions you're running from the lock file?

  • default discord avatar
    livog
    last month

    Here is the lock file, I also tryed updating the package, still getting the same error.



    I'm also attaching the error that i m getting. I have also tryed with both yarn and pnpm, same error on both.



  • default discord avatar
    carlosbensant
    2 weeks ago

    @livog Just for history, the error you were having was related to the version of Payload. The payload website template was still pointing to a previous path where the Rich Text component was located. In Payload version 2, the Rich Text component is in another location. I had the same issue when updating to payload v2.

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.