Im having this exact issue on the custom-server example when upgrading to payload 2x
https://github.com/TypeStrong/ts-node/pull/2062Error:
@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?
@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.
"@swc/core": "1.3.82" works I tried so many 💀
thanks tho
They need to release the fix to npm right?
Glad you got past it. We might need to add that as a peer dependency. Let me look into it
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.