javascript - 如何将此 node.js 模块降级到特定版本并防止以后自动升级?

标签 javascript node.js npm nodemailer

我正在使用 node.js Nodemailer 模块并遇到以下错误;

[Error: Unsupported configuration, downgrade Nodemailer to v0.7.1 or see the migration guide https://github.com/andris9/Nodemailer#migration-guide]

我查看了我的 package.json 并意识到它是 "nodemailer": "^1.8.0", 版本。

如何降级到 v0.7.1 并防止稍后在运行 npm update 时自动升级?

最佳答案

如果你正好需要 v0.7.1,使用 "nodemailer": "0.7.1",删除 node_modules 下的 nodemailer 并运行 npm install 再次。

另一种方法是运行命令:

npm remove nodemailer
npm install nodemailer@0.7.1 --save

关于javascript - 如何将此 node.js 模块降级到特定版本并防止以后自动升级?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33591036/

相关文章:

javascript - Jquery 中的 radio 令人头疼

mysql - 用于测试的临时 SQL 服务器

ios - (0, _reactNativeCodePush2.default) is not a function 错误在React native

node.js - nodejs 中的 jquery-url

node.js - 向 slackbot 发送私有(private)消息,而工作区的其他用户不会看到它

javascript - 为什么通过条件字符串连接添加 css 类会很糟糕?

javascript - AngularJS 中的 Controller 和模板

javascript - Jquery 获取类 "nodeId"值

同一台服务器上的 apache 和 Node 保留 ips?

node.js - 将 Node/Mongo 部署到 Openshift