2

I was trying to fix my Invalid Host Error by following the directions on the answer to this question: I am getting an "Invalid Host header" message when connecting to webpack-dev-server remotely

However, when I do what they say, I get this error:

 frontend@0.1.0 start /home/ubuntu/app/frontend
 react-scripts start

/home/ubuntu/app/frontend/node_modules/react-scripts/config/webpack.config.js:722
  public: 'mywebsite.org' // That solved it
  ^^^^^^

SyntaxError: Unexpected strict mode reserved word
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/ubuntu/app/frontend/node_modules/react-scripts/scripts/start.js:48:23)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! frontend@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the frontend@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

Why is this and how can I fix it

S1534
  • 83
  • 6

0 Answers0