Closed cffycls closed 1 week ago
{
"name": "backend-app",
"keywords": [
"malagu-component"
],
"version": "0.0.0",
"license": "MIT",
"files": [
"lib",
"src"
],
"dependencies": {
"@malagu/core": "2.58.0",
"@malagu/http": "2.58.0",
"@malagu/web": "2.58.0",
"@malagu/mvc": "2.58.0"
},
"devDependencies": {
"@malagu/cli": "2.58.0",
"@malagu/component": "2.58.0",
"@malagu/testing": "2.58.0",
"@types/supertest": "^2.0.12",
"supertest": "^6.2.4"
},
"scripts": {
"clean": "rimraf lib dist .malagu",
"test": "malagu-component test",
"build": "malagu build",
"start": "malagu serve",
"deploy": "malagu deploy -m scf -m test",
"deploy:test": "malagu deploy -m scf -m test",
"deploy:pre": "malagu deploy -m scf -m pre",
"deploy:prod": "malagu deploy -m scf -m prod"
}
}
在 pnpm 下,需要将间接依赖的 @malagu/xxx 显示声明出来。后面考虑兼容一下这种场景。
根据快速开发指引:
npm install -g @malagu/cli
malagu init backend-app
cd backend-app
malagu serve
访问 localhost:3000 返回 Cannot GET /
$curl http://localhost:3000/
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /</pre>
</body>
</html>
在 pnpm 下,需要将间接依赖的 @malagu/xxx 显示声明出来。后面考虑兼容一下这种场景。
好像不止是 pnpm 存在这种情况...
Update 1:
【环境】win11,node18,pnpm 使用malagu init初始化backend-app,curl访问404,而不是预期的“Welcome to Malagu”。
请求返回404