You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just hit a bug where yarn eject (or npm run eject) fails with the following message:
TypeError: Cannot read property 'react-scripts' of undefined
at inquirer.prompt.then.answer (node_modules/react-scripts/scripts/eject.js:149:36)
at <anonymous>
Here's the line in question. I had moved all my devDependencies to dependencies in order for Heroku to run then in a postinstall step (more info here) and so the eject was exploding on this line. To fix, all I needed to do was:
Not necessarily something that needs fixing, but if anyone is googling the exact error message above then this issue will hopefully guide them towards the same fix!
The text was updated successfully, but these errors were encountered:
geelen
changed the title
Ejecting crashes if no devDependencies exists in package.json
Ejecting crashes if no devDependencies exists in package.json
Jun 28, 2017
Just hit a bug where
yarn eject
(ornpm run eject
) fails with the following message:Here's the line in question. I had moved all my
devDependencies
todependencies
in order for Heroku to run then in apostinstall
step (more info here) and so the eject was exploding on this line. To fix, all I needed to do was:"version": "0.1.0", "private": true, + "devDependencies": {}, "dependencies": { "react": "^15.5.4", "react-dom": "^15.5.4", "react-scripts": "^1.0.7" },
Not necessarily something that needs fixing, but if anyone is googling the exact error message above then this issue will hopefully guide them towards the same fix!
The text was updated successfully, but these errors were encountered: