fix: use open-cli instead of require('open') for Node 20+ compatibility - #10517
Conversation
| "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.26.4.tgz", | ||
| "integrity": "sha512-+mORf3ezU3p3qr+82WvJSnQNE1GAYeoCfEv4fik6B5/2cvKZ75AX8oawWQdXtM9MmndooQj15Jr9kelRFWsuRw==", |
There was a problem hiding this comment.
these fields shouldn't be deleted
|
Hey @Ashutoshyadav01! Thanks for helping us with this issue 🙏 . I've left one comment |
|
@robert-hebel-sb Thanks for the feedback! I've now updated |
|
@Ashutoshyadav01 thanks for the fix! Although still there are changes in package-lock.json unrelated to |
|
@robert-hebel-sb Thanks for your feedback , I guess now it is ready for a look. |
|
Thank you for your effort @Ashutoshyadav01 the PR now looks great! 😙🤌 |
|
@robert-hebel-sb Thank you so much! 😊 |
## [5.27.1](v5.27.0...v5.27.1) (2025-08-01) ### Bug Fixes * use open-cli instead of require('open') for Node 20+ compatibility ([#10517](#10517)) ([47a5c1f](47a5c1f))
|
🎉 This PR is included in version 5.27.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [5.27.1](swagger-api/swagger-ui@v5.27.0...v5.27.1) (2025-08-01) ### Bug Fixes * use open-cli instead of require('open') for Node 20+ compatibility ([swagger-api#10517](swagger-api#10517)) ([47a5c1f](swagger-api@47a5c1f))
This PR fixes the error when running
npm run starton Node.js 20+ caused by usingrequire('open'), which no longer works due toopenbeing ESM-only.✅ Replaced:
"open-static": "node -e "require('open')('http://localhost:3002')\""
✅ With:
"open-static": "npx open-cli http://localhost:3002"
✅ Also added
open-clias a dev dependency.Fixes #10516