首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >au build抱怨文件未找到或无法访问

au build抱怨文件未找到或无法访问
EN

Stack Overflow用户
提问于 2017-08-16 17:11:17
回答 1查看 552关注 0票数 2

我已经通过au install apollo-client添加了阿波罗-客户端,现在当我运行au build时,我得到了一堆‘文件未找到’的消息:

代码语言:javascript
复制
Tracing apollo-client...
 ------- File not found or not accessible ------
| Location: /some/path/Client/src/whatwg-fetch.js
| Requested by: /some/path/Client/node_modules/apollo-client/apollo.umd.js
| Is this a package? Make sure that it is configured in aurelia.json and that it is not a Node.js package
 -----------------------------------------------
 ------- File not found or not accessible ------
| Location: /some/path/Client/src/graphql/language/printer.js
| Requested by: /some/path/Client/node_modules/apollo-client/apollo.umd.js
| Is this a package? Make sure that it is configured in aurelia.json and that it is not a Node.js package
 -----------------------------------------------
 ------- File not found or not accessible ------
| Location: /some/path/Client/src/redux.js
| Requested by: /some/path/Client/node_modules/apollo-client/apollo.umd.js
| Is this a package? Make sure that it is configured in aurelia.json and that it is not a Node.js package
 -----------------------------------------------
 ------- File not found or not accessible ------
| Location: /some/path/Client/src/graphql-anywhere.js
| Requested by: /some/path/Client/node_modules/apollo-client/apollo.umd.js
| Is this a package? Make sure that it is configured in aurelia.json and that it is not a Node.js package
 -----------------------------------------------
 ------- File not found or not accessible ------
| Location: /some/path/Client/src/symbol-observable.js
| Requested by: /some/path/Client/node_modules/apollo-client/apollo.umd.js
| Is this a package? Make sure that it is configured in aurelia.json and that it is not a Node.js package
 -----------------------------------------------
 ------- File not found or not accessible ------
| Location: /some/path/Client/src/apollo-link-core.js
| Requested by: /some/path/Client/node_modules/apollo-client/apollo.umd.js
| Is this a package? Make sure that it is configured in aurelia.json and that it is not a Node.js package
 -----------------------------------------------
 ------- File not found or not accessible ------
| Location: /some/path/Client/src/whatwg-fetch.js
| Requested by: /some/path/Client/node_modules/apollo-client/apollo.umd.js
| Is this a package? Make sure that it is configured in aurelia.json and that it is not a Node.js package
 -----------------------------------------------
 ------- File not found or not accessible ------
| Location: /some/path/Client/src/graphql/language/printer.js
| Requested by: /some/path/Client/node_modules/apollo-client/apollo.umd.js
| Is this a package? Make sure that it is configured in aurelia.json and that it is not a Node.js package
 -----------------------------------------------
 ------- File not found or not accessible ------
| Location: /some/path/Client/src/redux.js
| Requested by: /some/path/Client/node_modules/apollo-client/apollo.umd.js
| Is this a package? Make sure that it is configured in aurelia.json and that it is not a Node.js package
 -----------------------------------------------
 ------- File not found or not accessible ------
| Location: /some/path/Client/src/graphql-anywhere.js
| Requested by: /some/path/Client/node_modules/apollo-client/apollo.umd.js
| Is this a package? Make sure that it is configured in aurelia.json and that it is not a Node.js package
 -----------------------------------------------
 ------- File not found or not accessible ------
| Location: /some/path/Client/src/symbol-observable.js
| Requested by: /some/path/Client/node_modules/apollo-client/apollo.umd.js
| Is this a package? Make sure that it is configured in aurelia.json and that it is not a Node.js package
 -----------------------------------------------
 ------- File not found or not accessible ------
| Location: /some/path/Client/src/apollo-link-core.js
| Requested by: /some/path/Client/node_modules/apollo-client/apollo.umd.js
| Is this a package? Make sure that it is configured in aurelia.json and that it is not a Node.js package
 -----------------------------------------------
Tracing whatwg-fetch...
Tracing graphql/language/printer...
Tracing redux...
Tracing graphql-anywhere...
Tracing symbol-observable...
Tracing apollo-link-core...
Tracing core-js...

知道为什么会这样吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-08-16 18:55:51

是的,这是目前在我们的CLI中真正令人头疼的事情之一。如果安装了一个本身具有依赖项的依赖项,则必须确保更新aurelia.json文件以将所有这些依赖项都包含在vendor-bundle中。CLI团队意识到了这个问题,并且正在努力解决这个问题。

他们知道这一点,因为我不停地抱怨这件事。我很擅长抱怨。

更新2018-01-18

CLI现在有了au install,它将安装一个依赖项,然后尝试在aurelia.json文件中正确地设置它。

当使用我们的CLI创建新项目时,您可以完全避免这些问题,方法是切换到使用Webpack作为您的模块加载程序/绑定器。您将不得不选择创建一个“自定义”构建,但我最近已经转移,我不得不说,Webpack的经验,当使用奥雷利亚CLI是相当不错的。

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45719420

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档