@@ -43,6 +43,7 @@ const {reactNativeRootPath, templateName, templateConfigPath, directory} = argv;
4343
4444const REPO_ROOT = path . resolve ( __dirname , '../..' ) ;
4545const VERDACCIO_CONFIG_PATH = `${ reactNativeRootPath } /.circleci/verdaccio.yml` ;
46+ const NPM_REGISTRY_SERVER = 'http://localhost:4873' ;
4647
4748async function install ( ) {
4849 const VERDACCIO_PID = setupVerdaccio (
@@ -82,7 +83,7 @@ async function install() {
8283 process . stdout . write ( 'Published every package \u2705\n' ) ;
8384
8485 execSync (
85- `node cli.js init ${ templateName } --directory ${ directory } --template ${ templateConfigPath } --verbose --skip-install` ,
86+ `node cli.js init ${ templateName } --directory ${ directory } --template ${ templateConfigPath } --verbose --skip-install --yarn-config-options npmRegistryServer=" ${ NPM_REGISTRY_SERVER } " ` ,
8687 {
8788 cwd : `${ reactNativeRootPath } /packages/react-native` ,
8889 stdio : [ process . stdin , process . stdout , process . stderr ] ,
@@ -95,6 +96,12 @@ async function install() {
9596 cwd : directory ,
9697 stdio : [ process . stdin , process . stdout , process . stderr ] ,
9798 } ;
99+
100+ execSync (
101+ `yarn config set npmRegistryServer "${ NPM_REGISTRY_SERVER } "` ,
102+ options ,
103+ ) ;
104+
98105 const success = await retry ( 'yarn' , options , 3 , 500 , [ 'install' ] ) ;
99106
100107 if ( ! success ) {
0 commit comments