File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/react-scripts/scripts Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -149,13 +149,17 @@ prompt(
149149 ) ;
150150 console . log ( ) ;
151151
152+ // remove react-scripts and react-scripts binaries from app node_modules
153+ Object . keys ( ownPackage . bin ) . forEach ( function ( binKey ) {
154+ fs . removeSync ( path . join ( appPath , 'node_modules' , '.bin' , binKey ) ) ;
155+ } ) ;
156+ fs . removeSync ( ownPath ) ;
157+
152158 if ( fs . existsSync ( paths . yarnLockFile ) ) {
153159 console . log ( cyan ( 'Running yarn...' ) ) ;
154- fs . removeSync ( ownPath ) ;
155160 spawnSync ( 'yarnpkg' , [ ] , { stdio : 'inherit' } ) ;
156161 } else {
157162 console . log ( cyan ( 'Running npm install...' ) ) ;
158- fs . removeSync ( ownPath ) ;
159163 spawnSync ( 'npm' , [ 'install' ] , { stdio : 'inherit' } ) ;
160164 }
161165 console . log ( green ( 'Ejected successfully!' ) ) ;
You can’t perform that action at this time.
0 commit comments