question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow private npm packages as templates

See original GitHub issue

Is your proposal related to a problem?

No. I just had to create a project like CRA in my work and we allowed private repositories. I want to know if it is a thing that the CRA community wants in the CLI. If it’s ok I could work in a PR.

Describe the solution you’d like

probally a flag like:

npx create react-app --template some-template-name --npm-access-token="123"

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ricardoamedeiroscommented, Apr 29, 2020

with field main worked.

1reaction
ricardoamedeiroscommented, Apr 22, 2020

I discovered the problem. The template path within node_modules was not being found. I made the pull request with the following adjustment:

javascript:

create-react-app/packages/react-scripts/scripts/init.js

befor:

const templatePath = path.dirname( require.resolve(${templateName}/package.json, { paths: [appPath] }) );

after:

const templatePath = path.dirname( require.resolve(${templateName}/package.json, { paths: [${appPath}/node_modules] }) );

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating and publishing private packages - npm Docs
On the command line, navigate to the root directory of your package. cd /path/to/package ; To publish your private package to the npm...
Read more >
Private NPM Packages using GitHub Actions & Packages
Learn how to use GitHub Packages to host your own private packages. ‍ Written Version:▫ Website: ...
Read more >
npm packages in the Package Registry - GitLab Docs
Watch a video demo of how to publish npm packages to the GitLab Package Registry. ... If you would like to install a...
Read more >
Creating Your Own Private NPM Package in Azure DevOps
If you do not have NPM initialized, let's start there with the npm init command. Be sure to follow the instructions through this...
Read more >
Install private packages · Cloudflare Pages docs
Cloudflare Pages supports custom package registries, allowing you to include private dependencies in your application.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found