Im having this exact issue on the custom-server ex...

default discord avatar
Payload-Bot
last month
3

Im having this exact issue on the custom-server example when upgrading to payload 2x

https://github.com/TypeStrong/ts-node/pull/2062

Error:


@swc/core threw an error when attempting to validate swc compiler options.
You may be using an old version of swc which does not support the options used by ts-node.
Try upgrading to the latest version of swc.
Error message from swc:
Failed to deserialize buffer as swc::config::Options
JSON: {"sourceMaps":true,"module":{"noInterop":false,"type":"es6","strictMode":true,"ignoreDynamic":false},"swcrc":false,"jsc":{"parser":{"syntax":"typescript","tsx":false,"dynamicImport":true,"importAssertions":true},"target":"es5","transform":{"legacyDecorator":true,"react":{"throwIfNamespace":false,"useBuiltins":false}},"keepClassNames":false,"experimental":{"keepImportAssertions":true}}}

Any way to fix this?



Original message from @banks0 - Moved from https://discord.com/channels/967097582721572934/967097582721572937/1162378661383635088 (in #general)
  • discord user avatar
    denolfe
    Payload Team
    last month

    @banks0 If you explicitly install @swc/core 1.3.74 as a dev dependency does this change anything? Also ensure you're on the latest Payload.

  • default discord avatar
    banks0
    last month

    "@swc/core": "1.3.82" works I tried so many 💀



    thanks tho



    They need to release the fix to npm right?

  • discord user avatar
    denolfe
    Payload Team
    last month

    Glad you got past it. We might need to add that as a peer dependency. Let me look into it

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.