我正在运行npm安装,但它给了我一个错误.我还try 在更新之前运行下面的命令$npm安装npm,我也更新了优雅的fs.

$ npm install -g graceful-fs
graceful-fs@4.1.3 C:\Users\RDY672\AppData\Roaming\npm\node_modules\graceful-fs

错误如下:

$ npm install -g bower@1.3.12
npm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated graceful-fs@2.0.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
npm ERR! cb() never called!
npm ERR! not ok code 0

推荐答案

TL;DR:如果有必要,只需将bug归档,暂时忽略弃用警告.除非是抛出错误,否则这不是你的问题.


最有可能的是,它间接地依赖于过时版本的优雅fs,该版本依赖于 node 的内部模块(尽管它不应该).该模块必然在很大程度上取决于 node 的实现细节,但是4.x在这方面被写得不那么脆弱.在3年之间,API几乎没有什么变化.x和4.十、

值得一提的是,数周前,该模块在npm上的下载量排名第十.我看这没什么变化.由于该模块的使用份额很大(npm indirectly本身取决于过时的版本),Node has already instated a temporary fix where they're trying to get people off of the internal modules.

所以不要担心,除非你从中得到了错误.我通常忽略这些不赞成的警告,因为它们已经非常广为人知.

Node.js相关问答推荐

Azure虚拟机上的JS Express:可疑请求?

当FastifyJS向客户端发送响应时,apache 不会将其发送给他

为什么在导出的函数中调用node-sqlite3中的数据库方法时不起作用?

Mongoose抱怨说,整数是数字,而不是整数

"sh:/usr/local/bin/node:当它存在于文件目录中时未找到

Prisma 和 Nextjs:重新部署之前内容不会更新

如何在带有 JS 的 Nodejs 中使用没有 Async 方法的 Await

Next.js 在我的电脑上没有构建错误,但它们在使用 Vercel 部署时发生

ResponseError:键空间ks1不存在

使用react 组件加载特定 DIV 而无需重新加载整个页面

Mongoose-更新嵌套数组

如何限制 cron 表单将消息推送到 RabbitMQ?

如何在 Node.js 中逐字节读取二进制文件

Node.js + Express + Handlebars.js + 局部视图

运行摩卡+伊斯坦布尔+通天塔

ChildProcess 关闭、退出事件之间的区别

如何使用 Node.js、Express 和 Mongoose 进行身份验证?

从 React(同构应用程序)进行 API 调用时出现Access-Control-Allow-Origin问题

NPM:为什么要安装这个包?

如何在 node.js 沙箱中安全地运行用户提交的脚本?