防止重新创建或覆盖节点模块?

Prevent a node module from being recreated or overwritten?

node.js 中有什么方法可以防止模块永远不会被更新或覆盖吗?

你需要在依赖属性上写成准确的版本,例如:

  "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 查看完整的选项列表。