Closed wenchao0809 closed 3 years ago
midway2的 reload 能力是是由 @midwayjs/cli 带来的,确认下是否删除了老的 midway-bin 模块。
midway2的 reload 能力是是由 @midwayjs/cli 带来的,确认下是否删除了老的 midway-bin 模块。
我把midway-bin升级到最新版本还是不行这是我的package.json
{
"name": "fudan-cancer-backend",
"version": "1.0.0",
"description": "{{description}}",
"private": true,
"dependencies": {
"egg-scripts": "^2.13.0",
"midway": "^2.3.21",
"mssql": "^6.2.3",
"mysql2": "^2.2.5",
"sequelize": "6.3.5"
},
"devDependencies": {
"@types/mocha": "^8.0.3",
"@types/node": "^14.14.6",
"cross-env": "^7.0.2",
"egg-ci": "^1.18.0",
"midway-bin": "^2.2.4",
"midway-mock": "^2.1.4",
"tslib": "^1.8.1",
"tslint-midway-contrib": "^1.20.1",
"ts-node": "^9.0.0",
"tslint": "^6.1.3",
"typescript": "^4.0.5"
},
"engines": {
"node": ">=10.16.0"
},
"scripts": {
"start": "egg-scripts start --daemon --title=midway-server-fudan-cancer-backend --framework=midway --ts",
"stop": "egg-scripts stop --title=midway-server-fudan-cancer-backend",
"start_build": "npm run build && cross-env NODE_ENV=development dev",
"clean": "midway-bin clean",
"dev": "cross-env NODE_ENV=local midway-bin dev --ts",
"debug": "cross-env NODE_ENV=local midway-bin debug --ts",
"test": "npm run lint && midway-bin test --ts",
"cov": "midway-bin cov --ts",
"lint": "tslint --fix -p tsconfig.json -t stylish",
"ci": "npm run cov",
"build": "midway-bin build -c",
"autod": "midway-bin autod"
},
"ci": {
"version": "10"
},
"midway-bin-clean": [
".vscode/.tsbuildinfo",
"dist"
],
"repository": {
"type": "git",
"url": ""
},
"author": "anonymous",
"license": "MIT"
}
midway2的 reload 能力是是由 @midwayjs/cli 带来的,确认下是否删除了老的 midway-bin 模块。 使用 @midwayjs/cli创建项目是ok的, 我昨天一直看的官网V1的文档。。。。
@ET912 https://www.yuque.com/midwayjs/midway_v2/v1_upgrade_v2#KMf23 我们有升级文档,我加了一条,把midway-bin 替换为 @midwayjs/cli
基于
midway-init
创建得1.0版本修改文件可以正常触发reload,我自己手动升级到2.3.21
后无法触发reload
config.local.ts