目前的行为是什么?
yarn
使用已弃用的new Buffer()
构造函数,并在与NODE_PENDING_DEPRECATION=1
一起运行时引起弃用警告。
$ ag '\bBuffer\('
src/registries/npm-registry.js
340: const pw = new Buffer(String(password), 'base64').toString();
341: return 'Basic ' + new Buffer(String(username) + ':' + pw).toString('base64');
src/util/fs.js
835:const cr = new Buffer('\r', 'utf8')[0];
836:const lf = new Buffer('\n', 'utf8')[0];
预期的行为是什么?
yarn
不应使用已弃用/不安全的Buffer
构造函数。 根据弃用警告,应将new Buffer()
替换为Buffer.alloc()
, Buffer.allocUnsafe()
或Buffer.from()
; safe-buffer
软件包是另一种选择。
请提及您的node.js,yarn和操作系统版本。
$ node -v
v8.9.4
$ yarn -v
1.5.1
$ uname -a
Linux 4.15.6-300.fc27.x86_64 #1 SMP Mon Feb 26 18:43:03 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
在macOS上获得相同的警告。 我相信#5704是重复的。
作为目前的解决方法,我创建了一个~/bin/node
脚本,该脚本在$PATH
之前(本地安装) /usr/local/bin/node
$PATH
:
#!/bin/bash
/usr/local/bin/node --no-deprecation "$@"
仅供参考:刚刚经历了yarn的依赖项,还有两个仍然称为new Buffer()
:
我们可能需要更新这些内容。
@martinstuecklschwaiger该修复程序何时完成???
@marvinhagemeister v8-compile-cache刚刚发布了2.0.0版本,该版本修复了该错误。 希望我们能尽快更新到新版本。
@fengerzh @imsnif已经将新版本提交给了主https://github.com/yarnpkg/yarn/commit/546a1576edbf701021ce65e3dd8daff267083f52🎉
您何时计划使用此修复程序发布新版本? 我找不到有关您如何处理发行版的任何信息。
我看到在此问题上使用了high-priority
标签,这是否还意味着您要尽快推送此修复程序? 不仅尽快修复它。
编辑:并不意味着听起来有点急躁或要求苛刻,我只是很好奇您如何处理这些high-priority
问题。 我问的原因是因为我启动的每个新Shell实例都对此发出警告很烦人。
从节点v0.9.x升级到v0.10.1后,此警告开始弹出
@ piotr-cz您的意思是v10.1,0.10相当古老。
谢谢,我的意思是从v9.x升级到v10.1.0后,警告开始弹出
纱线1.6.0仍收到此警告
yarn install v1.6.0
(node:22339) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security
and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or
Buffer.from() methods instead.
我的node.js,yarn和操作系统版本
node -v
v10.1.0
yarn -v
1.6.0
uname -a
Darwin *****.local 17.5.0 Darwin Kernel Version 17.5.0: Fri Apr 13 19:32:32 PDT 2018;
root:xnu-4570.51.2~1/RELEASE_X86_64 x86_64
这里有什么进展吗? 我们真的很想在我们的项目中使用节点10,而无需任何解决方法🔥
这只是一个警告。 为什么会阻止您使用它?
此处存在同样的问题,导致我的Roots Sage主题无法编译而无法部署。 另请参阅https://discourse.roots.io/t/buffer-deprecated-yarn-warning/12525
@teohhanhui长期警告是有问题的,因为它们会使其他更有用的警告模糊不清:期望开发人员在每个构建版本上仔细阅读所有警告,并在心理上仅打折扣那些“可接受的”警告是不合理的。 因此,将所有警告视为错误是常见的(并且完全合理)。 这不是关于纱线的投诉,这很好。 但是“这只是警告”一词会引起很大的心理警钟。
有许多众所周知的大型软件/公司公司,它们的公司名称在整个公司范围内都有,例如:将警告视为错误或将其删除,但从不花时间人工查看警告列表。 由于上述原因。
这并不是说这是一个完美的建议,在每个地方都可以得到答复,但这并不罕见,并且很好地证明了它是可行的和有价值的。
如果您要将所有警告都视为错误,您是否有办法忽略/将警告列入白名单? 但是无论如何,我看不出您选择这样做是由yarn
造成的。 yarn
在这种情况下不会中断。
很抱歉这样做,但是我不得不锁定此问题,因为人们似乎没有阅读以前的评论。 总结如下:
对于这个问题和延迟,我代表整个Yarn团队表示歉意。
更新:上述PR现在已合并。 我们将尽快发布新版本。
具有此修复程序的1.7.0版刚刚发布。 谢谢你的耐心!
@teohhanhui在lerna堆栈中的单个存储库中使用它,因此用纱警告警告lerna进程终止(是的,这在这里更可能是lerna设置,但是清除警告也为我们解决了该问题)
@BYK谢谢BYK给您的努力
@BYK我仍然从Homebrew看到1.7.0的缓冲区警告:
$ NODE_OPTIONS=--trace-warnings yarn outdated
yarn outdated v1.7.0
(node:44538) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
at showFlaggedDeprecation (buffer.js:159:11)
at new Buffer (buffer.js:174:3)
at Object.module.exports.module.exports (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:4105:6)
at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
at Object.module.exports.module.exports (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:4228:12)
at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
at Object.module.exports.module.exports (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:56449:11)
at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
at Object.<anonymous> (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:43234:13)
at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
@ ezzatron同样在这里。
@ezzatron @AlexanderOMara
我认为警告仅在冲泡更新后第一次执行纱线后才会出现。 在第二次执行纱线时,警告对我不见了。
这是我的机器的当前状态:
yarn -v
1.7.0
node -v
v10.1.0
uname -a
Darwin *****.local 17.5.0 Darwin Kernel Version 17.5.0: Fri Apr 13 19:32:32 PDT 2018; root:xnu-4570.51.2~1/RELEASE_X86_64 x86_64
这是我的终端日志
$ yarn
yarn install v1.7.0
(node:73733) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[1/4] 🔍 Resolving packages...
success Already up-to-date.
✨ Done in 0.47s.
$ yarn
yarn install v1.7.0
[1/4] 🔍 Resolving packages...
success Already up-to-date.
✨ Done in 0.40s.
嗨,我在做yarn check
时仍然还有DeprecationWarning
yarn check
$ yarn check
yarn check v1.7.0
[---------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 0/1697(node:84081) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methodsinstead.
运行yarn upgrade
,由于某些软件包,您可能对upath
有依赖性,并且仍然安装了版本。
@rpellerin谢谢,但是upath
已经更新了
即使在yarn upgrade
我仍然会收到相同的警告,但不是与1.6版本相同
同样经过一些测试,它不仅限于yarn check
$ yarn
yarn install v1.7.0
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[-----------------------------------------------------------------------------------------------------------------------------------------------------------------------] 0/943(node:7042) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Building fresh packages...
✨ Done in 24.87s.
我已经在节点v10.1.0和v10.2.0上进行了测试,我在OSX上并使用brew安装纱线(使用--with-node-param参数)
@Justkant您可以运行NODE_OPTIONS=--trace-warnings yarn
吗? 这将告诉您哪个软件包触发了警告。
然后,您可以运行yarn why <package>
。 我会相应地答复。
是的,升级到1.7.0后已解决
谢谢@BYK
@rpellerin
yarn install v1.7.0
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[----------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 0/943(node:8741) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
at showFlaggedDeprecation (buffer.js:159:11)
at new Buffer (buffer.js:174:3)
at Object.<anonymous> (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:68767:20)
at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
at Object.module.exports.module.exports (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:129185:17)
at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
at Object.module.exports.module.exports.id (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:107036:12)
at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
at Object.module.exports.Object.defineProperty.value (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:62287:14)
at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Building fresh packages...
✨ Done in 30.10s.
但是,为什么我要执行yarn why <package>
呢? 该警告并不与本地包装有关,而仅与纱线本身有关,不是吗?
我以为是因为包装。 尝试使用npm中的纱线吗?
npm i -g yarn
使用npm中的纱线似乎可以正常工作
yarn
不会对我显示警告,但yarn outdated
可以。
$ NODE_OPTIONS=--trace-warnings yarn outdated
yarn outdated v1.7.0
(node:28493) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
at showFlaggedDeprecation (buffer.js:159:11)
at new Buffer (buffer.js:174:3)
at Object.module.exports.module.exports (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:4105:6)
at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
at Object.module.exports.module.exports (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:4228:12)
at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
at Object.module.exports.module.exports (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:56449:11)
at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
at Object.<anonymous> (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:43234:13)
at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
✨ Done in 1.10s.
注意:似乎旧的缓冲区构造函数仍用于全局CLI。 在处理yarn global
命令时,我仍然收到错误消息。 @BYK
阿克! 感谢您提供详细的报告。 我今天将对此进行研究。
好的,有问题的软件包是sshpk ,这是http-signature
所必需的,而request
是必需的。 有一个PR的修复程序,但似乎没有得到任何爱。 有人认识Joyent的人来帮助我们吗?
从节点1.0.0.0.0起的纱线1.7.0起仍然存在问题
通过从https://nodejs.org/en/卸载yarn随附的节点并安装稳定的8.11.2来解决的问题
通过卸载yarn随附的并安装了[旧版本]的节点修复了问题。
如果只是因为不安全而弃用该版本,那并不是真正的“修复”。
@mikestepanov链接的问题似乎已解决。 违规文件现在使用Buffer.from
:
https://github.com/joyent/node-sshpk/blob/175758a9473523409339e6c519c470c808ca03de/lib/algs.js
该版本似乎已发布为1.14.2,与http-signature
的必需版本范围匹配。
哎呀,看起来像只是更新yarn的lockfile并剪切一个新的版本应该可以解决这个问题。
唯一有帮助的是删除yarn.lock文件,如@pluma所说
FWIW这个错误为我打破了getstorybook
,因为它试图解析stderr,并将警告打印到该错误。 不知道storybook-cli
是否已更新以解决此问题,但值得一提的是这不仅仅是一个外观问题。
@BYK对于世界各地的开发人员来说,此错误的情况非常可悲,您是否可以发布固定版本的yarn(1.7.1或smth),其中包含https://github.com/中提出的程序包的凹凸版本
这个提交(从上个月开始)看起来应该已经解决了,但是我仍然在节点10.5.0和yarn 1.9.0-20180621.1511
(每晚)上看到它。 就像@Gurenax的情况一样,该警告仅在我的初次运行期间出现(删除node_modules
然后运行yarn
)。 如果这对其他人有帮助,我在下面提供了一些与我发现/发现的内容有关的注释。 似乎yarn
的依赖项已过时,因为可以在当前每夜的独立JS构建中看到new Buffer
调用。
mkdir empty-project; cd empty-project; npm init empty-project; yarn
)。v1.8
尽管应该用v1.7.0修复它)。 就我而言,这在最小的情况下并没有发生,因此我不得不更深入地研究。 首先,我运行了yarn upgrade
但这似乎并没有解决。--trace-warnings
运行,例如rm -rf node_modules/; NODE_OPTIONS=--trace-warnings yarn
:(node:4672) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
at showFlaggedDeprecation (buffer.js:159:11)
at new Buffer (buffer.js:174:3)
at Object.<anonymous> (/usr/share/yarn/lib/cli.js:68827:20)
at __webpack_require__ (/usr/share/yarn/lib/cli.js:22:30)
at Object.module.exports.module.exports (/usr/share/yarn/lib/cli.js:129944:17)
at __webpack_require__ (/usr/share/yarn/lib/cli.js:22:30)
at Object.module.exports.module.exports.id (/usr/share/yarn/lib/cli.js:107711:12)
at __webpack_require__ (/usr/share/yarn/lib/cli.js:22:30)
at Object.module.exports.Object.defineProperty.value (/usr/share/yarn/lib/cli.js:62536:14)
at __webpack_require__ (/usr/share/yarn/lib/cli.js:22:30)
在这一点上,我有些困惑。 打开/usr/share/yarn/lib/cli.js
在68827行附近偷看,我看到了:
/* 285 */
/***/ (function(module, exports, __webpack_require__) {
var stream = __webpack_require__(69)
var eos = __webpack_require__(549)
var inherits = __webpack_require__(59)
var shift = __webpack_require__(741)
var SIGNAL_FLUSH = new Buffer([0])
var onuncork = function(self, fn) {
if (self._corked) self.once('uncork', fn)
else fn()
}
var destroyer = function(self, end) {
return function(err) {
if (err) self.destroy(err.message === 'premature close' ? null : err)
else if (end && !self._ended) self.end()
}
}
在GitHub上搜索此代码中一些看起来更独特的部分,使我发现它来自v3.5.4之前的duplexify
。 接下来,我运行yarn why duplexify
,发现我的一个依赖项正在使用它。 但是,它使用的是v3.6.0,应该没有任何问题。 我尝试将该包/版本添加到我的空/最小项目中,然后重新运行yarn
。 确实,它运行良好:没有警告。 此外,这不能解释为什么跟踪显示与yarn
关联的webpack脚本。
尽管我不确定如何做到这一点,但有一次我在警告跟踪中找到了另一行,并且它指向同一webpack的cli.js文件,但其中的代码来自sshpk (在#之前) 175758a)。
意识到new Buffer
出现在yarn的独立JS nightly build中的代码中后,我最终放弃了,希望该消息在将来更新yarn后会自行消失。
@jacobq感谢您对此进行调查! 我不是这个专家-从字面上我只是碰到了这个问题-但在阅读并重新阅读了您的发现之后,听起来您在说的是Yarn包含了旧版本的duplexify
在其CLI代码中? 准确吗?
仍然看到这一点。
我刚刚去https://nodejs.org/ ,发现最新版本已经是10.5👀
同时,我和我的同事仍在使用8.x,因为此问题仍未解决😅因此热衷于探索10.x的新增功能! 🙏
@kachkaev不要让此警告阻止您! :微笑:
@jacobq已经有一些软件包要求节点> = 9才能工作。
由于这个警告,我也使用了节点8,但是现在每次我使用yarn时都不得不看到它,这确实令人失望。 它使我考虑改为使用npm,但是我非常喜欢yarn,并且不想切换回去。 每天都试图忽略此警告是可悲的。 😢
有人找到解决这个问题的办法了吗? 每次我执行yarn命令时都非常烦人
+1
纱线安装v1.7.0
信息找不到锁文件。
[1/4]解决包裹...
⠁(node:12916)[DEP0005] DeprecationWarning:由于安全性和可用性问题,不建议使用Buffer()。 请改用Buffer.alloc(),Buffer.allocUnsafe()或Buffer.from()方法。
在showFlaggedDeprecation(buffer.js:159:11)
在新的缓冲区(buffer.js:174:3)
在Object.module.exports.module.exports(C:\ Program Files(x86)\ Yarn \ lib \ cli.js:4105:6)
在__webpack_require__(C:\ Program Files(x86)\ Yarn \ lib \ cli.js:22:30)
在Object.module.exports.module.exports(C:\ Program Files(x86)\ Yarn \ lib \ cli.js:4228:12)
在__webpack_require__(C:\ Program Files(x86)\ Yarn \ lib \ cli.js:22:30)
在Object.module.exports.module.exports(C:\ Program Files(x86)\ Yarn \ lib \ cli.js:56449:11)
在__webpack_require__(C:\ Program Files(x86)\ Yarn \ lib \ cli.js:22:30)
在对象。(C:\ Program Files(x86)\ Yarn \ lib \ cli.js:43234:13)
我在OSX上也遇到了这个问题,但是:
yarn global add yarn
似乎可以解决...我不知道自制软件的版本是否被破解...🤔
@carddamom真的解决了这个问题,还是因为您已经运行过一次,问题才消失了? (我仍然看到new Buffer
在每晚7/6中出现134次。)我很好奇:如果删除node_modules
并再次运行yarn
,您是否再次看到警告?
这也为我解决了这个问题:
我删除了与Homebrew一起安装的纱,并通过npm在全球重新安装了它。 不再看到此问题,其他与gyp相关的错误也消失了。
我想知道自制软件的版本是否被破坏了……🤔
我现在肯定会把手指指向Homebrew。
@jacobq对我来说,因为我使用的是“ yarn global”,所以没有要卸载的node_modules,作为轶事,我也尝试过使用自制程序重新链接该软件包,并且错误再次出现,因此它进一步确认了这一点...
你只看到从tar.gz的释放和家酿(警告的原因,刚刚安装的tar.gz版本)是因为节点不发出弃用警告当模块调用new Buffer
是内部node_modules
目录。
因此,当您通过自制程序安装时,yarn可执行文件将位于:
/usr/local/bin/yarn
但是,当您通过npm安装时,它将位于以下路径(我在这里使用nvm):
~/.nvm/versions/node/v10.6.0/lib/node_modules/yarn/bin/yarn
代码完全相同,唯一的区别在于,因为npm将其安装到包含node_modules
的目录中,所以当前不会发出警告。
请参阅在本地缓冲区模块内部调用isInsideNodeModules以供参考。
从外观上看, lib/cli.js
仍然包含对new Buffer
的调用。 虽然这是一个很大的webpack捆绑包,所以我不知道它们来自什么库,但是上面的注释似乎已经确定了该包。
是的,只是确认Debian / Ubuntu存储库版本对我来说仍然在发生(大概出于上述原因),这肯定不是Homebrew所特有的。
如果要花一些时间来更新各种依赖项中new Buffer
的使用,也许现在值得找到一种方法来使该特定警告静音。 在我的身边,加上--no-deprecation
旗在适当的地方/usr/bin/yarn
作品,但感觉有点哈克和重手。
编辑:您也可以运行像NODE_OPTIONS=--no-deprecation yarn
这样的纱线,它可以工作。 我想我会将其设置为别名。
@jacobq ...对于你们的建议,我删除了我的评论,只留下了他的评论,这似乎很短! 不会添加更多。
...完成...
作为一个临时解决方案,我使用了@noinkling建议的别名。
对于使用fish
:
function yarn
env NODE_OPTIONS=--no-deprecation yarn $argv
end
这仍然在包含2f4bba1(?)的1.9.2 rc上发生,例如
yarn install v1.9.2
[1/5] 🔍 Validating package.json...
[2/5] 🔍 Resolving packages...
[3/5] 🚚 Fetching packages...
[----------------------------------------------------------------------] 0/1820
(node:1936) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[4/5] 🔗 Linking dependencies...
使用节点10.6,macOS 10.13.6。
@vieira是的,很不幸,还有一些其他的部门需要升级以完全解决此问题。 在这里查看
有同样的问题
节点v10.7.0,纱线1.9.2
node:67668) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=4 <=9".
@bogdansoare看起来您在项目中使用了不兼容的模块。 尝试yarn why upath
然后删除/更新将其插入的零件以消除错误。
PS + 1 /我也普遍不接受评论。 请改用反应按钮。
@jacobq这个GitHub问题已经关闭,但是我仍然在最新的1.9.2版本中看到该问题。 我了解此问题是由下游依赖性引起的,但尚不清楚Yarn团队是否认为此问题已解决。 应该解决此问题还是将其关闭,因为解决方案是禁用警告? 禁止警告对我和我的团队不是一个解决办法,因为在我的团队中禁用安全警告是不可接受的。
@corshamax此特定问题已解决,因为我们更新了代码以停止使用有问题的结构。 该警告仍然出现,因为我们的某些依赖项仍在使用它,但这是一个不同的问题(不幸的是,结果是相同的),应该报告给相关项目(然后在进行固定发行后再报告给我们,以便我们可以升级受影响的依赖项)。
对于所有内容,我们都欢迎请求请求,因此,如果您发现可以解决的问题,只需打开一个,我们将确保将其合并为下一个版本。 @jacobq通过列出可能需要更新的依赖https :
我看到了节点v10.8.0和yarn v1.9.4的问题。
似乎https://github.com/yarnpkg/yarn/pull/5934#issuecomment -406346724中提到的所有PR都已合并。 我希望这意味着我们很快就能看到解决方案。
@vrobinson是的,应该通过https://github.com/yarnpkg/yarn/pull/6208进行修复-您可以通过在独立JS中搜索new Buffer
并观察它仅出现在后备状态中来查看和评论。 有耐心:smile_cat:
更新:看起来它刚刚降落了:tada:所以注意下一个晚上。 对于所有帮助实现这一目标的人,:bowing_man:谢谢:pray :!
我收到此错误,此问题解决了吗?
@jacobq我正在使用debian软件包,我需要等到新软件包然后为“-”。
谢谢 :)
@ rof20004您明天应该可以开始使用它,如果需要的话,只需确保您有apt
指向每晚:
https://yarnpkg.com/zh-CN/docs/install#debian -nightly
@jacobq,所以我们将看到这个最终问题,终于用[email protected]彻底解决了,对吗?
可能不是补丁版本,更像是1.10
我也有同样的问题。
$ yarn install
node:39) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
error An unexpected error occurred: "https://registry.yarnpkg.com/axios/-/axios-0.18.0.tgz: getaddrinfo EADDRNOTAVAIL registry.yarnpkg.com registry.yarnpkg.com:443".
info If you think this is a bug, please open a bug report with the information provided in "/app/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
/app $ node -v
v10.10.0
/app $ yarn -v
1.9.4
/app $
有人有解决方案吗?
@ codestart123读了该线程,他们说它已在每晚修复,但尚未发布。
@ codestart123您提到的错误不是由此问题引起的(您可以忽略弃用警告):
error An unexpected error occurred: "https://registry.yarnpkg.com/axios/-/axios-0.18.0.tgz: getaddrinfo EADDRNOTAVAIL registry.yarnpkg.com registry.yarnpkg.com:443"
EADDRNOTAVAIL
是与网络相关的错误(错误:地址不可用)。 尝试运行ping registry.yarnpkg.com
以确认您的系统可以解析该名称并到达主机。
它已经修复了吗?
@ ryanzhu1024它已在几天前发布的1.10.0中修复👍
等待节点升级纱线版本。
不敢相信这个烦人的警告终于消失了。 谢谢 :)
Hooraaaay🙌
我在这里有一个类似的问题,任何想法: https :
@goktugyil您链接的问题未提及yarn
。 如果您使用的是纱线,请确保您拥有最新版本(当前为1.12.3 )。 如果您不使用yarn
请不要在此处交叉发布。 StackOverflow是询问一般编程问题的好地方,而https://github.com/nodejs/help是解决Node问题的好地方。 https://github.com/yarnpkg/yarn/issues用于功能请求和与纱线相关的问题(不适用于常规开发支持/问题)。
@arcanis / @BYK / @imsnif您介意锁定此线程吗? 这个问题已经在纱线及其相关性中解决了一段时间了,我认为在这里进行进一步的讨论不会使任何人受益。
最有用的评论
仅供参考:刚刚经历了yarn的依赖项,还有两个仍然称为
new Buffer()
:我们可能需要更新这些内容。