GYP ERR! build error. stack Error: 'make' failed with exit code 2

后端 未结 11 1368
自闭症患者
自闭症患者 2021-01-07 16:30

I am currently working on a nodejs web application I am having trouble pushing the application online with cloud foundry. I did some research on the errors and it seems that

11条回答
  •  离开以前
    2021-01-07 16:34

    For other people that stumble into this exact problem:

    In my case, the server node version was set to an older version in my package.json file than what my local environment was running. So check what you are running locally with:

    node --version
    -> 8.11.3
    

    Then look at your server setting in your package.json:

    {
      "name": "myapp",
      "version": "0.0.0",
      "private": true,
      "engines": {
        "node": "7.10.2" // <-- This is too old, set it to the node version you are running locally (8.11.3)
      },
    

    I hope this helps someone.

提交回复
热议问题