pomelo :Store.prototype.proto = EventEmitter.prototype

一,首先修改game-server文件夹内的package.json文件,pomelo版本改为2.2.5

二、删除game-server文件夹内的 node_modules文件夹 和 package-lock.json文件

三、返回上一层执行
sh npm-install.sh

$ cd game-server
$ pomelo start

/Users/allen/Project/pomelo/chatofpomelo-websocket/game-server/node_modules/socket.io/lib/store.js:35
Store.prototype.proto = EventEmitter.prototype;
^

TypeError: Cannot read property ‘prototype’ of undefined
at Object. (/Users/allen/Project/pomelo/chatofpomelo-websocket/game-server/node_modules/socket.io/lib/store.js:35:42)
at Module._compile (internal/modules/cjs/loader.js:799:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)
at Module.load (internal/modules/cjs/loader.js:666:32)
at tryModuleLoad (internal/modules/cjs/loader.js:606:12)
at Function.Module._load (internal/modules/cjs/loader.js:598:3)
at Module.require (internal/modules/cjs/loader.js:705:19)
at require (internal/modules/cjs/helpers.js:14:16)
at Object. (/Users/allen/Project/pomelo/chatofpomelo-websocket/game-server/node_modules/socket.io/lib/manager.js:16:13)
at Module._compile (internal/modules/cjs/loader.js:799:30)

pomelo :Store.prototype.proto = EventEmitter.prototype

发表评论

电子邮件地址不会被公开。 必填项已用*标注

滚动到顶部