Loopback 版本与 Loopback cli 版本
我有一个现有的环回应用程序,其版本为@loopback/core 2.1.0 和@loopback/cli 版本2.1.1。我无法使用命令行和 lb 命令创建控制器或数据源。当我将 Loopback/cli 版本升级到 3.1.1 时,我能够使用命令 lb4 来创建控制器和数据源,但存在一些依赖项版本不兼容。有人可以建议如何在 Loopback/cli 版本 2.1.1 中使用命令行吗?另外,loopback和loopback/cli版本有什么关系(因为loopback 4仍然使用loopback/cli版本3.1.1)。 以下是我的项目的包依赖项。 "@loopback/boot": "^2.0.1", "@loopback/context": "^3.1.0", "@loopback/core": "^2.1.0", "@loopback/openapi-v3": "^3.1.0", "@loopback/repository": "^2.0.1", "@loopback/rest": "^3.0.1", "@loopback/rest-explorer": "^2.0.1", "@loopback/service-proxy": "^2.0.1", "配置": "^3.3.1", "express": "^4.17.1", "环回连接器休息": "^3.7.0", "节点获取": "^2.6.1", "p-事件": "^4.1.0", "snyk": "^1.305.0", “tslib”:“^1.10.0”
I have a existing loopback application with @loopback/core version 2.1.0 and @loopback/cli version 2.1.1. I am not able to create controllers or datasources using commandline with lb command. When I upgrade the loopback/cli version to 3.1.1, I was able to use the command lb4 to create controllers and datasources but there are some dependency version incompatibilities. Can some one suggest how to use command lines with loopback/cli version 2.1.1. Also, how are loopback and loopback/cli versions are related(because loopback 4 is still using loopback/cli version 3.1.1).
Below are the package dependencies of my project.
"@loopback/boot": "^2.0.1",
"@loopback/context": "^3.1.0",
"@loopback/core": "^2.1.0",
"@loopback/openapi-v3": "^3.1.0",
"@loopback/repository": "^2.0.1",
"@loopback/rest": "^3.0.1",
"@loopback/rest-explorer": "^2.0.1",
"@loopback/service-proxy": "^2.0.1",
"config": "^3.3.1",
"express": "^4.17.1",
"loopback-connector-rest": "^3.7.0",
"node-fetch": "^2.6.1",
"p-event": "^4.1.0",
"snyk": "^1.305.0",
"tslib": "^1.10.0"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Loopback cli 维护一个所需的所有包及其版本的列表。因此,如果我们这些与我们正在使用的不兼容,就会出现错误。因此您可以使用 update 命令来初始更新现有依赖项的版本,然后尝试创建控制器和数据源。请参阅 https://loopback.io/doc/en/lb4/Update-generator .html。
loopback cli maintains a list of all the packages and its versions that are needed. So if we those are not compatible with the one that we are using then the error comes up. so you can use the update command to initially update the version of exsiting dependencies and then try creating the controllers and datasources. Refer https://loopback.io/doc/en/lb4/Update-generator.html.