-
Notifications
You must be signed in to change notification settings - Fork 979
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. |
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: