websockets-demo icon indicating copy to clipboard operation
websockets-demo copied to clipboard

npm start error

Open zenbgs opened this issue 3 years ago • 0 comments

clientServer = connect.createServer(connect.static(__dirname)).listen(process.env.PORT || 8081), ^

TypeError: connect.static is not a function at Object. (C:\Users\zengambol\Desktop\websockets-demo\server.js:5:49) ←[90m at Module._compile (internal/modules/cjs/loader.js:1118:30)←[39m ←[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)←[39m ←[90m at Module.load (internal/modules/cjs/loader.js:982:32)←[39m ←[90m at Function.Module._load (internal/modules/cjs/loader.js:875:14)←[39m ←[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)←[39m ←[90m at internal/main/run_main_module.js:17:47←[39m npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start: node server npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\zengambol\AppData\Roaming\npm-cache_logs\2022-03-25T08_50_46_104Z-debug.log

zenbgs avatar Mar 25 '22 08:03 zenbgs