[Regression] [2.56] payload run command does not work #13970
-
Describe the BugSince release 2.56, running Link to the code that reproduces this issueAll repro steps are in this issue Reproduction StepsRun Which area(s) are affected? (Select all that apply)area: core Environment Info |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
Please add a reproduction in order for us to be able to investigate. Depending on the quality of reproduction steps, this issue may be closed if no reproduction is provided. Why was this issue marked with the
|
Beta Was this translation helpful? Give feedback.
-
|
Hey @christophemenager, I think you meant It has an error - You need to rewrite it like this: import config from '@payload-config'
import { getPayload } from 'payload'
const main = async () => {
const payload = await getPayload({ config })
}
await main()One change that could be related is in this PR #13564 which adds auto process exit for bin scripts which was a bug, so now you have to |
Beta Was this translation helpful? Give feedback.
-
|
I ran into this and was pulling my hair out until I found this discussion. this is something that should be in the docs like on this page: https://payloadcms.com/docs/local-api/outside-nextjs The example does do it this way (with the |
Beta Was this translation helpful? Give feedback.
Hey @christophemenager, I think you meant
3.56, are you sure this worked in3.55? Because when I copy paste:It has an error -
awaitwithoutasyncand you don't actually execute themainfunction`You need to rewrite it like this:
One change that could be related is in this PR #13564 which adds auto process exit for bin scripts which …