React-app-rewired: devServerConfigFn is not defined

Created on 11 Dec 2017  路  4Comments  路  Source: timarney/react-app-rewired

    "react": "^16.2.0",
    "react-dom": "^16.2.0",
    "react-scripts": "1.0.17",
    "react-app-rewired": "^1.3.7"
require.cache[require.resolve(devServerConfigPath)].exports = (proxy, allowedHost) => {
  const config = devServerConfigFn(proxy, allowedHost);
  return overrides.devServer(config);
}
> react-app-rewired start

devServerConfigFn is not defined
npm ERR! code ELIFECYCLE
npm ERR! errno 1

Most helpful comment

https://github.com/timarney/react-app-rewired/pull/164 - this is the proper fix for this issue. Something that had been reverted accidentally got reapplied, leaving the project in an inconsistent state.

All 4 comments

https://github.com/timarney/react-app-rewired/pull/164 - this is the proper fix for this issue. Something that had been reverted accidentally got reapplied, leaving the project in an inconsistent state.

thanks you , i refered #157 and fixed it .

157 was reverted because it changed the shape of the config-overrides.js file exports, and therefore was a breaking change that should have been held back until react-app-rewired version 2.0 (I made the original mistake in merging it when I should not have).

161 reverted #157.

160 accidentally restored one small section of #157, leaving react-app-rewired in an inconsistent state.

164 is the correct way to fix that accidentally restored section, rather than restoring the rest of #157 too.

1.38 is up.

Was this page helpful?
0 / 5 - 0 ratings