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(
149
149
) ;
150
150
console . log ( ) ;
151
151
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
+
152
158
if ( fs . existsSync ( paths . yarnLockFile ) ) {
153
159
console . log ( cyan ( 'Running yarn...' ) ) ;
154
- fs . removeSync ( ownPath ) ;
155
160
spawnSync ( 'yarnpkg' , [ ] , { stdio : 'inherit' } ) ;
156
161
} else {
157
162
console . log ( cyan ( 'Running npm install...' ) ) ;
158
- fs . removeSync ( ownPath ) ;
159
163
spawnSync ( 'npm' , [ 'install' ] , { stdio : 'inherit' } ) ;
160
164
}
161
165
console . log ( green ( 'Ejected successfully!' ) ) ;
You can’t perform that action at this time.
0 commit comments