Closed zhengcanbiao closed 7 years ago
egg@0.9.0
这都啥时候的版本了....
$ npm run autod
$ rm -rf package-lock.json
$ npm i
最好你重新用 egg-init 生成一个新的 simple 骨架吧。 egg 1.0 之前的版本我们不保证兼容性的。
npm run autod 可以了,看来版本还是得用最新的呀,thank you
只要你不锁版本,依赖都一起更新,我们会保证兼容性的。
你那个是太旧了, 0.9.0 之前,只是 beta 的,所以不保证兼容性。
另外,建议用 egg-init 重新生成骨架,很多东西我们都精简了,如 index.js 没了,npm scripts 也补了不少。
ports的话在index.js里设置了。 不知道最近egg有更新什么模块吗或做了什么改动吗?请大神帮忙看下可能是什么问题,谢谢!
贴上package.json配置 { "name": "server", "version": "1.0.0", "description": "ieebook-server", "private": true, "dependencies": { "abiao-open-wechat-api": "^2.0.2", "co-wechat": "^1.0.0", "egg": "^0.9.0", "egg-cors": "^1.0.0", "egg-multiple-static": "^0.2.1", "egg-redis": "^1.0.1", "egg-session-redis": "^1.0.0", "egg-socket.io": "^1.2.1", "jsonwebtoken": "^7.3.0", "koa-jwt": "^1.3.0", "koa-xml-body": "^1.1.0", "mysql": "^2.13.0", "node-uuid": "^1.4.8", "pinyin": "^2.8.3", "sequelize": "^3.30.2", "shortid": "^2.2.8", "thunkify": "^2.1.2", "underscore": "^1.8.3", "validator": "^7.0.0", "wechat-api": "^1.32.0", "wechat-auth": "^1.1.2", "wechat-crypto": "0.0.2", "wechat-oauth": "^1.2.1", "xml2js": "^0.4.17" }, "devDependencies": { "autod": "^2.7.1", "egg-bin": "^2.0.2", "egg-ci": "^1.1.0", "egg-mock": "^2.1.0", "eslint": "^3.13.1", "eslint-config-egg": "^3.2.0", "supertest": "^2.0.1", "webstorm-disable-index": "^1.1.2" }, "engines": { "node": ">=6.0.0" }, "scripts": { "start": "node index.js", "dev": "egg-bin dev", "test": "npm run lint -- --fix && npm run test-local", "test-local": "egg-bin test", "cov": "egg-bin cov", "lint": "eslint .", "ci": "npm run lint && npm run cov", "autod": "autod", "debug": "egg-bin dev $NODE_DEBUG_OPTION" }, "ci": { "version": "6" }, "repository": { "type": "git", "url": "" }, "author": "liutension", "license": "MIT", "boilerplate": { "name": "egg-boilerplate-simple", "version": "2.1.0", "description": "boilerplate for egg quickstart", "repository": { "type": "git", "url": "git@github.com:eggjs/egg-boilerplate-simple.git" }, "homepage": "https://github.com/eggjs/egg-boilerplate-simple" } }