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

Failed to start project #20

Open
iksent opened this issue Apr 2, 2019 · 2 comments
Open

Failed to start project #20

iksent opened this issue Apr 2, 2019 · 2 comments

Comments

@iksent
Copy link

iksent commented Apr 2, 2019

yarn start produces next error:

...\node_modules\react-app-rewire-hot-loader\index.js:28
  getBabelLoader(config).options.plugins.push(plugin);
                        ^
TypeError: Cannot read property 'options' of undefined

My files:

package.json:

    "devDependencies": {
        "react-app-rewire-hot-loader": "^2.0.1",
        "react-app-rewired": "1.6.2", // Also tried with 2.1.1 - same error
        "react-hot-loader": "^4.8.2",
    },
    "scripts": {
        "start": "react-app-rewired start",
        "build": "react-app-rewired build",
        "test": "react-app-rewired test --env=jsdom",
        "eject": "react-scripts eject",
    ...

config-overrides.js:

const rewireReactHotLoader = require('react-app-rewire-hot-loader')

/* config-overrides.js */
module.exports = function override (config, env) {
    config = rewireReactHotLoader(config, env)
    return config
}

I have no babel.config.js and .babelrc

@MahsaHJ
Copy link

MahsaHJ commented Jun 10, 2019

I have the same problem

@akash-rajput
Copy link

works perfectly with

    "react-app-rewired": "2.1.5",
    "react-hot-loader": "4.12.17"

& config-overrides.js

const rewireReactHotLoader = require('react-app-rewire-hot-loader')

/* config-overrides.js */
module.exports = function override(config, env) {
  config = rewireReactHotLoader(config, env)
  return config
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants