【发布时间】:2019-07-11 06:00:21
【问题描述】:
我使用 Node 10.15 的 Keystone.js 4 项目无法在 Heroku 上启动:
Error: Cannot find module './lib/core/importer'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/app/node_modules/keystone/index.js:6:16)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
Process exited with status 1
State changed from crashed to starting
Starting process with command `node ./dist/keystone.js`
State changed from starting to crashed
Process exited with status 1
internal/modules/cjs/loader.js:583
throw err;
我以完全相同的方式配置了其他 Keystone 应用程序,并且可以正常运行。
我尝试禁用构建缓存,创建一个新的应用程序实例以部署到并通过 Heroku 控制台验证源中确实存在相关文件。
项目在本地 Windows 10 和 *nix 环境中构建和运行。
我可以做些什么来调试这个?
【问题讨论】:
标签: heroku keystonejs