在www.example.com上托管时,我的Node版本出现Mongoose错误Render.com
状态显示:生成代码时以状态1退出。
Jun 15 12:09:54 PM ==> It looks like we don't have access to your repo, but we'll try to clone it anyway.
Jun 15 12:09:54 PM ==> Cloning from https://github.com/yashkolte/New-Instagram...
Jun 15 12:09:56 PM ==> Checking out commit e6b9470786f0cd5ab8d449315eb3201968d9cc4f in branch main
Jun 15 12:10:01 PM ==> Using Node version 14.17.0 (default)
Jun 15 12:10:01 PM ==> Docs on specifying a Node version: https://render.com/docs/node-version
Jun 15 12:10:01 PM ==> Running build command 'yarn'...
Jun 15 12:10:01 PM yarn install v1.22.5
Jun 15 12:10:01 PM info No lockfile found.
Jun 15 12:10:01 PM [1/4] Resolving packages...
Jun 15 12:10:08 PM [2/4] Fetching packages...
Jun 15 12:10:13 PM error mongoose@7.3.0: The engine "node" is incompatible with this module. Expected version ">=14.20.1". Got "14.17.0"
Jun 15 12:10:13 PM error Found incompatible module.
Jun 15 12:10:13 PM info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Jun 15 12:10:13 PM ==> Build failed 😞
如何解决这个问题,请给予'render'的替代方案,如果错误无法解决。
1条答案
按热度按时间xa9qqrwz1#
我在www.example.com上找到了有关指定节点版本的文档render.com
https://render.com/docs/node-version
在package.json中添加这些行
然后提交并推送到git,在'render'上部署最新的提交
现在问题解决了