【问题标题】:ReactJS: Getting an error while starting the serverReactJS:启动服务器时出错
【发布时间】:2020-06-25 05:43:37
【问题描述】:
$ yarn start

Failed to compile.

Cannot read property 'compilation' of undefined

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with signal "SIGTERM".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "start-js" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

我使用的是 Ubuntu 18.04.4 LTS。有时它通常在重新启动后工作,我已经匹配了所有节点、npm 和纱线版本,它很好。我试过删除node_modules。有时它也会显示此错误。

{ [Error: EPIPE: broken pipe, write] errno: -32, code: 'EPIPE', syscall: 'write' } 

package.json scripts

"start-js": "react-scripts start",
"start": "HTTPS=true PORT=8100 REACT_APP_OPEN_TO_URL=https://xyz.University.com/localhost npm-run-all -p watch-css start-js",

【问题讨论】:

    标签: node.js reactjs npm webpack yarn-lock.json


    【解决方案1】:

    你需要安装这个插件指定你的 webpack 版本

    npm install --save-dev uglifyjs-webpack-plugin@1
    

    更多信息可以参考这个网址https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/360

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-04-18
      • 2011-01-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多