是否阻止重新创建或覆盖节点模块?

时间:2015-07-14 08:16:14

标签: node.js node-modules

在node.js中是否有任何方法可以阻止模块永远不被更新或覆盖?

1 个答案:

答案 0 :(得分:0)

您需要将其编写为依赖项属性的确切版本,例如:

  "dependencies": {
    "async": "1.3", // exact version this never will be changed/overwritten/updated/etc...
    "body-parser": "~1.5.2", // This could be updated to version reasonably close to 1.5.2
    "bower": "^1.3.8", // This could be updated to version compatible with 1.3.8
  }

Please look at here获取完整的选项列表。