npx degit https://github.com/midwayjs/hooks/examples/react-faas ./hooks-app
cd hooks-app
pnpm install
pnpm run // 可以跑
npm run deploy // 部署到阿里云
打开网页,报错
{"errorMessage":"Cannot find module '@midwayjs/fc-starter'\nRequire stack:\n- /code/all.js\n- /var/fc/runtime/nodejs16_alinode/prepare_code.js\n- /var/fc/runtime/nodejs16_alinode/invoke.js\n- /var/fc/runtime/nodejs16_alinode/bootstrap.js","errorType":"FunctionUnhandledError: ImportModuleError","stackTrace":["Error: Cannot find module '@midwayjs/fc-starter'","Require stack:","- /code/all.js","- /var/fc/runtime/nodejs16_alinode/prepare_code.js","- /var/fc/runtime/nodejs16_alinode/invoke.js","- /var/fc/runtime/nodejs16_alinode/bootstrap.js"," at Module._resolveFilename (node:internal/modules/cjs/loader:933:15)"," at Module._load (node:internal/modules/cjs/loader:778:27)"," at Module.require (node:internal/modules/cjs/loader:1005:19)"," at require (node:internal/modules/cjs/helpers:102:18)"," at (/code/all.js:2:30)"," at Module._compile (node:internal/modules/cjs/loader:1105:14)"," at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)"," at Module.load (node:internal/modules/cjs/loader:981:32)"," at Module._load (node:internal/modules/cjs/loader:822:12)"," at Module.require (node:internal/modules/cjs/loader:1005:19)"]}
打开网页,报错
把fc-starter换到dependency
打开网页,返回一大段字符串