-
Notifications
You must be signed in to change notification settings - Fork 984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug?]: Generate page command not working #11149
Comments
Hey @tanmaythole 👋 I just tried to reproduce this issue with the following steps:
The generator command worked as expected and didn't error out in the way you see in your project. I see from the environment information you are using node v18. Can you please upgrade to node v20 and try again to see if that fixes your issue? If not it would also be good to confirm what |
Hey @Josh-Walker-GM Thanks for the prompt reply. I have upgraded the node version to 20, but still no luck. The output of
This issue occurs when I set up commit-lint for the project using |
I'm not sure of the next steps here @tanmaythole. I did try reproducing by adding the same dependencies but didn't see the issue occur. I do believe that this is likely a real issue though and probably comes down to the fact we're on an older version of execa than other packages might be. I'll ask the team if they have any suggestions on next steps here. |
Hey @Josh-Walker-GM , I looked into the root cause of the issue and found that it occurs due to different versions of execa. In Redwood, version 5.1.1 is being used, which doesn't support ECMAScript modules. The issue arises after adding dependencies that require a newer version of execa, which does support ECMAScript modules. To resolve this in Redwood, we can either update the execa version or check which version is being used and then act accordingly. |
Hey Tanmay, 👋 I noticed this comment had not been replied to and didn't want to leave you hanging. I'm not sure the approach forward, but wanted to bump the discussion!
Is this something Redwood should handle or should you handle in your project specifically? It seems like since you are adding deps that require an execa bump outside of Redwood specs, then it should be your issue to handle. But, looking at Josh's note above...
It might be prudent for RW to handle this? Is there some mechanism you propose that might help with this situation? |
Hey @pantheredeye, thanks for replying! For now, I've handled this situation in my project by downgrading the dependencies, but that's not an ideal solution. Redwood should consider upgrading the dependencies. I'll research how we can approach this and then propose a mechanism. |
What's not working?
On executing
yarn redwood generate page home /
, I am getting errorError [ERR_REQUIRE_ESM]: require() of ES Module /<project-path>/node_modules/execa/index.js from /<project-path>/node_modules/@redwoodjs/internal/dist/generate/graphqlCodeGen.js not supported.
Stacktrace:
How do we reproduce the bug?
No response
What's your environment? (If it applies)
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: