簡體   English   中英

npm 在 MacOS big sur 上安裝 ws 失敗

[英]npm install ws fails on MacOS big sur

我嘗試通過“npm install ws”安裝 websocket,但它總是返回

npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "ws" under a package
npm ERR! also called "ws". Did you name your project the same
npm ERR! as the dependency you're installing?
npm ERR!
npm ERR! For more information, see:
npm ERR! https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/croydon/.npm/_logs/2021-03-18T00_55_40_611Z-debug.log

請你能幫忙解決一下嗎?

謝謝!

我只在全球范圍內成功安裝了 ws 。 請注意,舊的全局安裝方式已被棄用。 如果您嘗試,您將收到帶有說明的錯誤消息。 新方式:

npm install --location=global ws

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM