0

cloned the create-react-app repository and made some modifications to it. Now, I want to use my updated version to create React projects locally. Essentially, I'd like to use a command like npx create-custom-react-app to generate new React projects using my custom version.

How can I set this up so that I can use my modified create-react-app version to initialize React projects locally?

I attempted to use yarn link to link my local version of create-react-app to my global npx setup, but I wasn't able to get it working as expected. What I was expecting:

I hoped that after linking my custom version with yarn link, I would be able to run npx create-custom-react-app and create new React projects based on my modified version.

1 Answer 1

0

I solved my problem. I locally published the update I made using Verdaccio. The root of the problem was that the npx create-react-app command depends on multiple packages. After publishing all the required packages to Verdaccio locally, I was able to use my updated create-react-app project by running my custom command npx create-custom-react-app and successfully created a project.

If you also want to test an npm package locally or avoid publishing it directly, Verdaccio is really useful. You can find its documentation here: Verdaccio Documentation.

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.