簡體   English   中英

嘗試為 togetherjs 應用程序設置集線器服務器,並且我正在使用 node.js 運行服務器時出現以下錯誤

[英]Trying to set a hub server for togetherjs application and i am using node.js to run the server i get the following error

錯誤:在 Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:286:25) at Module.require (module.js:365) 中找不到模塊“websocket-server” :17) 在對象的 require (module.js:384:17)。 (D:\\Rahul\\hubServer\\togetherjs-develop\\togetherjs-develop\\hub\\websocket-compat.js:27:28) at Module._compile (module.js:434:26) at Object.Module._extensions..js (module.js:452:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17)

這意味着您尚未安裝該模塊。 要做到這一點

npm install websocket-server

通常,您將擁有一個package.json文件,而不是手動執行此操作,您可以通過執行npm install來安裝所有模塊

我想將 websocket-server 保存到包中,運行以下命令:

npm  install websocket-server --save

請記住在您站點所在的目錄中執行npm install __ 否則節點將找不到它。

暫無
暫無

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

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