question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

project can not work after upgrade react-scripts form 2.0.0-next.a671462c to 2.0.0

See original GitHub issue

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:)

  1. init project with react-scripts@2.0.0-next.a671462c
$ create-react-app app --scripts-version 2.0.0-next.a671462c
  1. 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');
  1. 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.
  1. 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.) image

Actual Behavior

(Write what happened. Please add screenshots!) image

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:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
henkvhestcommented, Sep 28, 2018
1reaction
Timercommented, Sep 28, 2018

react-scripts@2.0.1 is out. Please upgrade your dependencies and see if this is fixed.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found