简体   繁体   English

npm在Windows 10内部预览版本14366上失败

[英]npm fails on windows 10 insider preview build 14366

It seems that npm is broken (as well as the nodejs itself) on the new windows version build 1433 在新的Windows版本内部版本1433上,npm似乎已损坏(以及nodejs本身)

This is what happens when I ran 这是我跑步时发生的情况

npm -v

events.js:141 throw er; events.js:141 throw er; // Unhandled 'error' event ^ //未处理的“错误”事件^

Error: This socket is closed. 错误:此套接字已关闭。 at WriteStream.Socket._writeGeneric (net.js:640:19) at WriteStream.Socket._write (net.js:694:8) at doWrite (_stream_writable.js:292:12) at writeOrBuffer (_stream_writable.js:278:5) at WriteStream.Writable.write (_stream_writable.js:207:11) at WriteStream.Socket.write (net.js:618:40) at WriteStream.stream.write (C:\\Program Files\\nodejs\\node_modules\\npm\\node_m at Cursor.write (C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\npmlo at Cursor.(anonymous function) [as show] (C:\\Program Files\\nodejs\\node_modul at Object.ProgressBar.hide (C:\\Program Files\\nodejs\\node_modules\\npm\\node_mo 3.9.5 在WriteOrBuffer(_stream_writable.js:278:12)在doWrite(_stream_writable.js:292:12)在WriteStream.Socket._write(net.js:694:8)在WriteStream.Socket._writeGeneric(net.js:640:19): 5)在WriteStream.stream.write(C:\\ Program Files \\ nodejs \\ node_modules \\ npm)在WriteStream.Socket.write(net.js:618:40)在WriteStream.Socket.write(_stream_writable.js:207:11) Cursor.write上的\\ node_m(C:\\ Program Files \\ nodejs \\ node_modules \\ npm \\ node_modules \\ npmlo在Cursor。(匿名函数)[如图所示] C:\\ Program Files \\ nodejs \\ node_modules \\ npm \\ node_mo 3.9.5

I've tried npm upgrade, but does not help much. 我已经尝试过npm升级,但是并没有太大帮助。

Are there any hotfix solutions or why this could happen? 是否有任何修补程序解决方案,或者为什么会发生这种情况?

From what I can see this is a known issue with some version of Windows 10: https://github.com/npm/npm/issues/12887 . 从我可以看到,这是某些版本的Windows 10的已知问题: https : //github.com/npm/npm/issues/12887 I find the proposed solution a bit weird - that the issue is presented only when you change the width of the console away from the default. 我发现建议的解决方案有点奇怪-仅当您将控制台的宽度更改为默认值时才会出现此问题。 You might give it a try. 您可以尝试一下。 As it doesn't sound very plausible I am adding the github comment where I found it: https://github.com/npm/npm/issues/12887#issuecomment-222525339 Also running the command prompt in legacy mode seems to be another workaround. 因为听起来不太合理,所以我在找到它的地方添加了github注释: https : //github.com/npm/npm/issues/12887#issuecomment-222525339在旧模式下运行命令提示符似乎是另一回事解决方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM