Run npm install --production on OpenShift

后端 未结 4 1497
一整个雨季
一整个雨季 2021-02-06 01:53

When I push my code to OpenShift, it looks like it\'s installing my devDependencies which takes forever. I would really love to set it up so it wil

4条回答
  •  灰色年华
    2021-02-06 02:19

    1. Create a .npmrc file where the node_modules folder is located.

    2. Open it with your text-editor and add this to it:

      production = true

    P.S. no semicolons or any other characters

    This will ensure that devDependencies are not installed on the OPENSHIFT server

提交回复
热议问题