Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run eject silently fails when a config folder already exist #1054

Closed
ugogo opened this issue Nov 17, 2016 · 7 comments
Closed

npm run eject silently fails when a config folder already exist #1054

ugogo opened this issue Nov 17, 2016 · 7 comments

Comments

@ugogo
Copy link

ugogo commented Nov 17, 2016

Description

npm run eject silently fails when a config folder already exist.

Expected behavior

It's a common behavior to have a /config folder at the base of a project.
npm run eject should throw an error or even better, "merge" new files with existing ones.

Actual behavior

➜  react-starter git:(master) mkdir config
➜  react-starter git:(master) npm run eject

> react-scripts eject

Are you sure you want to eject? This action is permanent. [y/N]
y
Ejecting...
➜  react-starter git:(master)

Environment

node -v: 5.0.0
npm -v: 3.3.6
Operating system: macOS Sierra

Reproducible Demo

  • Clone the repo
  • mkdir config
  • npm run eject

Thanks 🙏

@gaearon
Copy link
Contributor

gaearon commented Nov 17, 2016

I think this was fixed in #951, but it's not released yet.

@ugogo
Copy link
Author

ugogo commented Nov 17, 2016

It seems that those checks are focused on files inside the folder, but doesn't check the folder itself?

@gaearon
Copy link
Contributor

gaearon commented Nov 17, 2016

Can you check if it's reproducible on master?

@ugogo
Copy link
Author

ugogo commented Nov 18, 2016

Noob question but, how could I do that?

According to NPM documentation, I tried this

"devDependencies": {
    "react-scripts": "git://github.com/facebookincubator/create-react-app.git"
  }

but doesn't work Could not install /var/folders/………

@gaearon
Copy link
Contributor

gaearon commented Nov 18, 2016

This wouldn't work. You'd need to follow the Contributing guide in the repo to test changes.

@ugogo
Copy link
Author

ugogo commented Nov 18, 2016

> react-scripts eject

Are you sure you want to eject? This action is permanent. [y/N]
y
Ejecting...
`config` already exists in your app folder. We cannot continue as you would lose all the changes in that file or directory. Please move or delete it (maybe make a copy for backup) and run this command again.

npm ERR! Darwin 16.1.0
…

All's good, thanks 👍

@ugogo ugogo closed this as completed Nov 18, 2016
@moffsugita
Copy link

moffsugita commented Oct 25, 2018

Me too where is the file??
config already exists in your app folder.

@lock lock bot locked and limited conversation to collaborators Jan 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants