最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

node.js - Npm i installing dev dependency using omit=dev flag - Stack Overflow

programmeradmin0浏览0评论

I am trying npm install on a helloworld node js application with the environment set to production. It is installing dev dependency even if the environment is set to production. Is there anything I am missing out on?

"devDependencies": {
  "c8xxxxx": "^10.0.0",
   "gaxios": "^6.0.0",
   "mocha": "^10.0.0",
   "sinon": "^18.0.0",
   "supertest": "^7.0.0",
   "wait-port": "^1.0.4",
   "abcd": "^1.0.0"
}

This is what my devdependencies in package.json looks like and just to check I have added c8xxxxx as an invalid dependency. And command I am using is npm install --omit=dev

I expected that dev dependencies shouldn't be installed

发布评论

评论列表(0)

  1. 暂无评论