Closed
Description
Is 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
Activity