We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 431b80f commit 80b85e4Copy full SHA for 80b85e4
scripts/eject.js
@@ -148,13 +148,19 @@ prompt(
148
);
149
console.log();
150
151
+ try {
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
+ } catch(e) {}
158
+
159
if (fs.existsSync(paths.yarnLockFile)) {
160
console.log(cyan('Running yarn...'));
- fs.removeSync(ownPath);
161
spawnSync('yarnpkg', [], {stdio: 'inherit'});
162
} else {
163
console.log(cyan('Running npm install...'));
164
spawnSync('npm', ['install'], {stdio: 'inherit'});
165
}
166
console.log(green('Ejected successfully!'));
0 commit comments