project can not work after upgrade react-scripts form 2.0.0-next.a671462c to 2.0.0
See original GitHub issueIs this a bug report?
yes
Did you try recovering your dependencies?
yes
Which terms did you search for in User Guide?
“Updating to New Releases”, “Migrating from 2.0.0-next.xyz”
Environment
(paste the output of the command here)
faild to run create-react-app --info
Environment:
OS: Windows 10
Node: 8.11.4
Yarn: 1.5.4
npm: 5.6.0
Watchman: Not Found
Xcode: N/A
Android Studio: Not Found
Packages: (wanted => installed) react: ^16.5.2 => 16.5.2 react-dom: ^16.5.2 => 16.5.2 react-scripts: 2.0.0-next.a671462c => 2.0.0
Steps to Reproduce
(Write your steps here:)
- init project with react-scripts@2.0.0-next.a671462c
$ create-react-app app --scripts-version 2.0.0-next.a671462c
- add dva and modify
src/index.js
$ cd app
$ yarn add dva
// src/index.js
import React from 'react';
import dva from 'dva';
import createHistory from 'history/createHashHistory';
// 1. Initialize
const app = dva({
history: createHistory(),
});
// 2. Plugins
// app.use({});
// 3. Register global model
// app.model(require('../models/index').default);
// 4. Router
app.router(() => <div>Test</div>);
// 5. Start
app.start('#root');
- The project can be successfully started
$ yarn start
yarn run v1.5.1
$ react-scripts start
Starting the development server...
Compiled successfully!
You can now view app in the browser.
Local: http://localhost:3000/
On Your Network: http://192.168.30.22:3000/
Note that the development build is not optimized.
To create a production build, use yarn build.
- update react-scripts to 2.0.0, project can not work any more.
$ yarn add --exact react-scripts@2.0.0
$ yarn start
yarn run v1.5.1
$ react-scripts start
Starting the development server...
Failed to compile.
./node_modules/dva-core/lib/index.js
Module not found: Can't resolve '@babel/runtime/core-js/get-iterator' in 'D:\git
hub\app\node_modules\dva-core\lib'
Compiling...
Failed to compile.
./node_modules/dva-core/lib/index.js
Module not found: Can't resolve '@babel/runtime/core-js/get-iterator' in 'D:\git
hub\app\node_modules\dva-core\lib'
Expected Behavior
(Write what you thought would happen.)
Actual Behavior
(Write what happened. Please add screenshots!)
Reproducible Demo
(Paste the link to an example project and exact instructions to reproduce the issue.) https://github.com/goblin-laboratory/cra/tree/demo
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
react-scripts - UNPKG
1, This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app). 2. 3, Below you will find some information ...
Read more >'npm start' returns error: "There might be a problem with the ...
There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you...
Read more >react-scripts: Versions - Openbase
2.0 is a minor release that adds support for production profiling and ignoring TypeScript type errors to make migrating JavaScript projects to TypeScript...
Read more >react-app-rewired - npm
How to rewire your create-react-app project · 1) Install react-app-rewired · 2) Create a config-overrides.js file in the root directory · 3) 'Flip' ......
Read more >バージョン指定してcreate-react-appを実行 - Qiita
More than 1 year has passed since last update. ... '2.0.0-next.9754a231', '2.0.0-next.a671462c', ... If you do this, you can't go back!
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My issue in https://github.com/facebook/create-react-app/issues/5103#issuecomment-425077257 is now solved with 2.0.1
react-scripts@2.0.1
is out. Please upgrade your dependencies and see if this is fixed.