-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Improve install of templates from places other than npm
registry
#18973
Comments
Add support for templates published as scoped packages. Partially fixes facebook#18973.
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
This issue still needs community's attention. Can someone review it? |
Came here to +1 this issue. Template install from NPM works fine, from git repos is worse, and from the local filesystem seems nearly nonfunctional for me. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
Yes, it still happens. |
Still happening with React Native 0.57.8. |
@piranna, would you be open to move this to CLI repository and work together with us to improve this support? We are working on |
Hi @grabbou, where's the CLI repository? How can I be able to move this? |
It's here -> https://github.com/react-native-community/react-native-cli/ I am afraid you just need to reopen issues there, close the ones here and (optionally), submit a PR again. |
Closing as this should be filed in the CLI as noted above 👌 |
When trying to install a project template from other place than published as a
npm
package (github forks, local filesystem, local tarfile, http server...) I can't be able to do it due to several problems. Debuging them, I get to the conclussion the problem is atreact-native/local-cli/generator/templates.js
Lines 112 to 120 in 26684cf
npm
not supporting mono-repos)templateName
gets not cleaned, file extension should be removedtemplateName
can't be different of the package name at the templatepackage.json
file, correct name should be extracted once the template is installednpm
,installPackage
is just a concatenation of the stringreact-native-template-
and the provided template name, not allowing to use scoped packages as templates. Provided template should be checked and splitted, and the scoped prefixed to the generatedtemplateName
Environment
Steps to Reproduce
Try to init a React Native project using a template from a git mono-repo, or from a local filesystem folder, or from a tarfile on the local filesystem or a web server, or from a scoped
npm
package.Expected Behavior
All the provided methods should be able to correctly install the provided template.
Actual Behavior
All of them fails.
The text was updated successfully, but these errors were encountered: