You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Activity
ianschmitz commentedon Feb 6, 2020
Supporting this use case sounds reasonable, but couldn't it be solved through existing methods such as a .npmrc file?
itelo commentedon Feb 6, 2020
hmmm, I didn't know about .npmrc file, I believe puting the access token there should work fine.
ricardoamedeiros commentedon Apr 11, 2020
Hi,
Even configuring the .npmrc correctly, at the end of the build the customization module is not found in the private npm.
log:
Custom template at nexus:
.npmrc config:
Any solution?
ricardoamedeiros commentedon Apr 11, 2020
not working.
ricardoamedeiros commentedon 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.jsbefor:
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] }) );mrmckeb commentedon Apr 29, 2020
Hi @itelofilho, can you please confirm that your template has a
mainfield?We've resolve this issue, but until our next release, templates must have a main field - which is required by
require.resolve. See:e0b179c#diff-1453d9590326c639309801105bc967c2
ricardoamedeiros commentedon Apr 29, 2020
with field main worked.
mrmckeb commentedon Apr 29, 2020
Closing this off, thanks for confirming. We'll release the fix for this soon, sorry again.