如何修复:“资产路径必须从项目源根开始”?
我们有一个NRWL/NX项目,可以在Windows上构建,但它在Linux(CI Sytem)上失败。
错误是:
/root/dev/apps/dmc-svr/src/资产资产路径必须从项目源根开始:apps \ dmc-svr \ src
它似乎是Windows/linux路径问题
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
问题是
sourceroot
proterty inproject.json
属性的窗口,修复程序就是简单地用slash \\ 代码> \ :
sourceroot“:” apps/dmc-svr/src“
我们猜想这是由某些NX-Schema生成的。
The problem was a Windows like path for the
sourceRoot
property inproject.json
the fix is to simply replace the backslash
\\
with a slash\
:sourceRoot": "apps/dmc-svr/src"
We guess that this has been generated by some nx-schema.
从Angular CLI迁移到NX时,我只是遇到了同样的问题。事实证明,我会切换分支,
angular.json
文件迁移到NX后再次出现。它应该使用nxproject.json
现在,因此删除angular.json
文件已修复。I've just has this same issue when migrating from the Angular CLI to NX. Turns out I'd switched branches and the
angular.json
file appeared again after migrating to NX. It should be using the NXproject.json
file now so deleting theangular.json
file fixed it.