安装特定版本的winston软件包

时间:2018-04-16 10:22:55

标签: javascript node.js winston

可以通过npm下载特定版本的winston,如下所示:
npm install winston=2.2.0

因为在下载最新版本时,我面临的问题是我用2.2.0编写的现有代码:

(node:13100) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: cb is not a function
(node:13100) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 

1 个答案:

答案 0 :(得分:0)

是的,npm install winston@2.2.0

有关详情,请参阅npm install文档:https://docs.npmjs.com/cli/install