Is there a way of making “npm ci” install devDependencies, or “npm install” not update package-lock.json?

后端 未结 2 1299
旧时难觅i
旧时难觅i 2021-02-20 01:05

I\'m trying to put together documentation for new developers installing our codebase on their local development environments. I\'d like to give them command(s) that:

2条回答
  •  梦如初夏
    2021-02-20 01:38

    Override NODE_ENV variable

    When your NODE_ENV environment variable is set to production, using npm ci will not install devDependencies. But if you still want to install devDependencies

    npm ci --also=dev
    

    will do the trick ;)

提交回复
热议问题