Skip to content

Support template sources outside of npmjs.com #8844

Closed
@andredigenova

Description

@andredigenova

Is your proposal related to a problem?

Using create-react-app templates outside of the npmjs.com ecosystem is painful. It seems the only viable way to do it is pull the code down yourself and use the file: syntax, or host a tarball somewhere.

This is fairly important for template code bases that are private since there doesn't appear to be a no-cost way of hosting private packages on npmjs.com.

Describe the solution you'd like

There are a couple solutions to this and I think both of them would be universally useful.

  • Support git repo URI syntax in the --template argument.
  • Support an argument to specify a 3rd party npm registry for the template

I'm sure there are probably others I didn't think of.

Describe alternatives you've considered

Setting a 3rd-party npm package registry on npm globally before running npx create-react-app seems to be broken. I tested it with Github's npm registry and it failed with an odd error part way through project setup.

All variations of git URI syntax I've tried don't seem to work and produce errors mostly related to cra-template getting injected when it shouldn't be.

Additional context

(Write your answer here.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions