-
Describe the BugRunning CLI commands produces different results at different times with no other system changes. It's possible this is due to specific system constraints but no errors are produced. Example: ❯ pnpm payload migrate:status
> [email protected] payload
> cross-env NODE_OPTIONS=--no-deprecation payload migrate:status
<no output>
<wait 30 seconds>
❯ pnpm run payload migrate:status
> [email protected] payload
> cross-env NODE_OPTIONS=--no-deprecation payload migrate:status
[11:15:33] WARN: No email adapter provided. Email will be written to console. More info at https://payloadcms.com/docs/email/overview.
[11:15:33] INFO: Reading migration files from <redacted>/pages-editor/src/migrations
┌─────────────────┬───────┬─────┐
│ Name │ Batch │ Ran │
├─────────────────┼───────┼─────┤
│ 20250210_142843 │ │ No │
└─────────────────┴───────┴─────┘
[11:15:33] INFO: Done. Link to the code that reproduces this issuehttps://github.com/cloud-gov/pages-editor/ Reproduction StepsThis happened running a variety of migration commands as shown above. The database is PostGRES running locally Which area(s) are affected? (Select all that apply)area: core Environment Info
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hey @drewbo — we will look into this immediately. Thanks for the heads-up! |
Beta Was this translation helpful? Give feedback.
-
An update - this is caused by your use and import from The long and short is that for some reason, that package breaks @AlessioGr will know more here but here's what you can do for now: Change this import: import { $convertToMarkdownString, TRANSFORMERS } from '@lexical/markdown'; To this: import { $convertToMarkdownString, TRANSFORMERS } from '@payloadcms/richtext-lexical/lexical/markdown'; I have confirmed that this resolves the issue in your project. We re-export these utilities for this exact reason. Would love for Lexical to look into this themselves (we've reported it) so others won't fall into this insane "gotcha" but for now, this is a workaround. Will mark this as a discussion so others can benefit from this! |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick response @jmikrut. @AlessioGr Not sure if this is helpful but I got both a successful and unsuccessful run under my old configuration while running ...
MODULE 2152: load "/home/vcap/app/node_modules/prismjs/components/prism-swift.js" for module "/home/vcap/app/node_modules/prismjs/components/prism-swift.js"
MODULE 2152: looking for "/home/vcap/app/node_modules/prismjs/components/prism-typescript.js" in ["/home/vcap/app/node_modules","/home/vcap/app/.node_modules","/home/vcap/app/.node_libraries","/home/vcap/deps/0/node/lib/node"]
MODULE 2152: load "/home/vcap/app/node_modules/prismjs/components/prism-typescript.js" for module "/home/vcap/app/node_modules/prismjs/components/prism-typescript.js"
MODULE 2152: looking for "/home/vcap/app/node_modules/prismjs/components/prism-java.js" in ["/home/vcap/app/node_modules","/home/vcap/app/.node_modules","/home/vcap/app/.node_libraries","/home/vcap/deps/0/node/lib/node"]
MODULE 2152: load "/home/vcap/app/node_modules/prismjs/components/prism-java.js" for module "/home/vcap/app/node_modules/prismjs/components/prism-java.js"
MODULE 2152: looking for "/home/vcap/app/node_modules/prismjs/components/prism-cpp.js" in ["/home/vcap/app/node_modules","/home/vcap/app/.node_modules","/home/vcap/app/.node_libraries","/home/vcap/deps/0/node/lib/node"]
MODULE 2152: load "/home/vcap/app/node_modules/prismjs/components/prism-cpp.js" for module "/home/vcap/app/node_modules/prismjs/components/prism-cpp.js"
<the prior logs are always printed, successful logs continue here>
MODULE 2152: Module._load REQUEST net parent: /home/vcap/app/node_modules/pg/lib/stream.js
MODULE 2152: load built-in module net
NET 2152: pipe false undefined
NET 2152: connect: find host <redacted db host>
NET 2152: connect: dns options { family: undefined, hints: 32 }
NET 2152: connect: autodetecting
... It looks like it either hangs on the final |
Beta Was this translation helpful? Give feedback.
An update - this is caused by your use and import from
@lexical/markdown
- see this PR for a change we had to make because of that package:#9382
The long and short is that for some reason, that package breaks
tsx
transpilation and Node fails silently. It looks to be because ofprism
and some type of circular dependency scenario with async imports. Low-level node stuff.@AlessioGr will know more here but here's what you can do for now:
Change this import:
To this:
I have confirmed that this resolves the issue in…