Refactor create-react-admin and support ra-supabase#10511
Merged
Conversation
slax57
requested changes
Feb 13, 2025
Contributor
slax57
left a comment
There was a problem hiding this comment.
Also found some issues while testing
-
instructions in the generated Readme only mention npm and yarn
-
creating an app with pnpm throws errors at runtime
✘ [ERROR] Could not read from file: /home/slax57/workspaces/remove-me/node_modules/ra-ui-materialui/src
node_modules/.pnpm/react-admin@5.5.3_@mui+utils@6.4.3_@types+react@18.3.18_react-dom@19.0.0_react-is@19.0.0_react@19.0.0/node_modules/react-admin/src/index.ts:4:14:
4 │ export * from 'ra-ui-materialui';
I believe it comes from the Vite config.
- creating an app with supabase (and npm) throws error at runtime
You cannot render a <Router> inside another <Router>. You should never have more than one in your app.
I believe duplicate comes from ra-supabase-ui-materialui
- Installing an app with bun or pnpm still says
Start the app in development mode by running yarn dev.(yarn)
slax57
approved these changes
Feb 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The interactive mode forces us to document the choices to select, which makes tutorials a bit harder to follow. The recent introduction of the
--basicflag only addresses one particular case.We also want to promote
ra-supabase.TODO
Solution
Make the interactive mode optional. By default, create-react-admin will create an empty react-admin app (no data provider, no auth provider, no resource, npm)
Users who want to use interactive mode must specify it:
Users who want to override one option can do so in the command line
Remove the
--basicoption, which is now uselessAdd support for provider shortcuts (
fakerest->ra-data-fakerest, etc)Add support for more package managers (
bunandpnpm)Add support for
ra-supabaseHow To Test
make build-create-react-admin installIt's difficult, even impossible for yarn, to test the detection of the package manager used to run the command:
bun run ./node_modules/.bin/create-react-adminshould usebunas the installer (a bun lock file will be generated)npm run ./node_modules/.bin/create-react-adminshould usenpmas the installer (a npm lock file will be generated)Additional Checks
masterfor a bugfix, ornextfor a feature