【发布时间】:2016-12-19 00:37:49
【问题描述】:
我已经全局安装了pouchdb-server,我收到了这条关于graceful-fs的消息:
$ npm install -g pouchdb-server
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
正如消息所说,软件包将失败并显示node > 7.0(我使用),所以我想知道如何执行升级。
如果我执行:
$ npm ls graceful-fs -g
我看到graceful-fs在多个全局包中使用,但只有一个旧版本在`pouchdb-server:
├─┬ pouchdb-server@1.2.1
│ ├─┬ couchdb-harness@0.1.6
│ │ └─┬ glob@3.1.21
│ │ └── graceful-fs@1.2.3
│ ├─┬ http-pouchdb@1.1.3
│ │ └─┬ pouchdb@5.4.5
│ │ └─┬ lie@3.0.4
│ │ └─┬ es3ify@0.2.2
│ │ └─┬ jstransform@11.0.3
│ │ └─┬ commoner@0.10.8
│ │ └── graceful-fs@4.1.11
│ ├─┬ pouchdb-adapter-node-websql@6.1.0
│ │ └─┬ websql@0.4.4
│ │ └─┬ sqlite3@3.1.8
│ │ └─┬ node-pre-gyp@0.6.31
│ │ ├─┬ tar@2.2.1
│ │ │ └─┬ fstream@1.0.10
│ │ │ └── graceful-fs@4.1.9
│ │ └─┬ tar-pack@3.3.0
│ │ └─┬ fstream@1.0.10
│ │ └── graceful-fs@4.1.9
│ └─┬ pouchdb-node@6.1.0
│ └─┬ leveldown@1.5.0
│ └─┬ prebuild@4.5.0
│ ├─┬ node-gyp@3.4.0
│ │ ├─┬ fstream@1.0.10
│ │ │ └── graceful-fs@4.1.11
│ │ └── graceful-fs@4.1.11
│ └─┬ node-ninja@1.0.2
│ └── graceful-fs@4.1.11
├─┬ webpack@1.13.1
│ ├─┬ enhanced-resolve@0.9.1
│ │ └── graceful-fs@4.1.4
│ └─┬ watchpack@0.2.9
│ └─┬ chokidar@1.5.1
│ └─┬ fsevents@1.0.12
│ └─┬ node-pre-gyp@0.6.25
│ └─┬ tar@2.2.1
│ └─┬ fstream@1.0.8
│ └── graceful-fs@4.1.3
我试过npm update -g graceful-fs 但这不起作用,升级作为全局包依赖项的包的正确方法是什么?
明确一点:我不想全局安装graceful-fs 包;相反,我想升级由pouchdb-server 包使用的graceful-fs 的安装。
【问题讨论】:
标签: node.js npm versioning