如何将NG-Bootstrap安装到NX单声道存储库中?
尝试使用NX将NG-Bootstrap安装到多项目单元存储库中时,我会收到以下错误:
npx ng add @ng-bootstrap/ng-bootstrap --project=web-app
The add command requires to be run in an Angular project, but a project definition could not be found.
我假设这是因为我正在使用project.json。这是一个角度项目,但没有角度。
When trying to install ng-bootstrap into a multi project mono repo using Nx I get the following error:
npx ng add @ng-bootstrap/ng-bootstrap --project=web-app
The add command requires to be run in an Angular project, but a project definition could not be found.
I am assuming this is because I am using project.json. It is an Angular project but without angular.json.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,现在作为答案,我为您提供了这个答案:
但是,这当然会失败,因为NX示意图没有处理 - 项目参数(有一个(有一个 猜PR要完成!
我 代码> ng添加命令来自适当目录。
Ok, now as an answer I have this for you :
But of course this will fail because the Nx schematics did not handle the --project parameter (there is a PR to be done I guess !) :
So, for your particular case, I'd say you did not choose the Angular option when scaffolding the Nx workspace, or you migrated to project.json ... or you did not run the
ng add
command from the proper directory.