'SyntaxError: Unexpected strict mode reserved word' when editing my reactjs webpack config file

▼魔方 西西 提交于 2021-01-28 04:11:51

问题


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

来源:https://stackoverflow.com/questions/65639318/syntaxerror-unexpected-strict-mode-reserved-word-when-editing-my-reactjs-webp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!