React-app-rewired: ReferenceError: devServerConfigPath is not defined

Created on 9 Dec 2017  路  13Comments  路  Source: timarney/react-app-rewired

Get this error after upgrading to version 1.3.6
Downgrading to 1.3.5 resolves the issue...

Probably related to:

Thanks for react-app-rewired! It's great!

Most helpful comment

@didmehh
It's typo in react-app-rewired/scripts/start.js on line 15
require.cache[require.resolve(devServerConfigPath)]
should be
require.cache[require.resolve(devserverConfigPath)]

as it is defined on the top as devserverConfigPath
so one of these are not typed correctly

All 13 comments

Looks I was to hurry, sorry about that.

Yes, also with 1.3.7.

no worries ;-)

Looks like #160 accidentally re-applied part of #157.

I'm had some issue.

/Users/work/workspace/apps/project/node_modules/react-app-rewired/scripts/start.js:15
require.cache[require.resolve(devServerConfigPath)].exports = (proxy, allowedHost) => {
                              ^

ReferenceError: devServerConfigPath is not defined
    at Object.<anonymous> (/Users/work/workspace/apps/project/node_modules/react-app-rewired/scripts/start.js:15:31)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Function.Module.runMain (module.js:575:10)
    at startup (node.js:160:18)
    at node.js:445:3
  • Env
node -v => 6.1.0
npm -v => 4.6.1
  • package.json
"dependencies": {
    "antd": "^2.13.4",
    "moment": "^2.19.1",
    "react": "15.6.1",
    "react-dom": "15.6.1",
    "react-redux": "^5.0.6",
    "react-router-dom": "^4.2.2",
    "react-scripts": "1.0.14",
    "redux": "^3.7.2",
    "redux-saga": "^0.16.0",
    "redux-thunk": "^2.2.0"
  },
  "scripts": {
    "start": "react-app-rewired start",
    "build": "react-app-rewired build",
    "test": "react-app-rewired test --env=jsdom",
    "eject": "react-scripts eject"
  },
  "devDependencies": {
    "babel-plugin-import": "^1.6.0",
    "react-app-rewired": "^1.3.1"
  }

how should to solve it?

@didmehh
It's typo in react-app-rewired/scripts/start.js on line 15
require.cache[require.resolve(devServerConfigPath)]
should be
require.cache[require.resolve(devserverConfigPath)]

as it is defined on the top as devserverConfigPath
so one of these are not typed correctly

@Kocisov
good job.
Before npm install was normal, but after the update was wrong.
so, i think about PR.

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.

Yeah, that is it 馃憤

1.38 is up.

How to fix it ?

Try updating to the latest.

Thanks it work 馃憤

Was this page helpful?
0 / 5 - 0 ratings