AU构建抱怨
问题描述:
我已经通过au install apollo-client
加入阿波罗客户端找不到文件或访问,现在当我运行au build
我得到了一堆“找不到文件”消息:AU构建抱怨
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...
任何想法,这是为什么发生了什么?
答
是的,这是目前仍然与我们的CLI对接的真正痛苦之一。如果您安装的依赖项本身具有依赖性,则必须确保更新aurelia.json
文件以将vendor-bundle
中的所有这些依赖项也包含在内。 CLI团队意识到这个问题并正在努力解决这个难题。
他们意识到这一点,因为我对此抱怨不断。我很善于抱怨。
UPDATE 2018年1月18日
的CLI现在有au install
将安装的依赖性,然后尝试正确设置它在你的aurelia.json
文件。
当使用CLI创建新项目时,您可以切换到使用Webpack作为模块加载器/打包程序,从而完全避免这些问题。你将不得不选择创建一个“自定义”版本,但最近我已经移除了,我不得不说使用Aurelia CLI时的Webpack体验相当不错。