我已经通过au install apollo-client添加了阿波罗-客户端,现在当我运行au build时,我得到了一堆‘文件未找到’的消息:
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...知道为什么会这样吗?
发布于 2017-08-16 18:55:51
是的,这是目前在我们的CLI中真正令人头疼的事情之一。如果安装了一个本身具有依赖项的依赖项,则必须确保更新aurelia.json文件以将所有这些依赖项都包含在vendor-bundle中。CLI团队意识到了这个问题,并且正在努力解决这个问题。
他们知道这一点,因为我不停地抱怨这件事。我很擅长抱怨。
更新2018-01-18
CLI现在有了au install,它将安装一个依赖项,然后尝试在aurelia.json文件中正确地设置它。
当使用我们的CLI创建新项目时,您可以完全避免这些问题,方法是切换到使用Webpack作为您的模块加载程序/绑定器。您将不得不选择创建一个“自定义”构建,但我最近已经转移,我不得不说,Webpack的经验,当使用奥雷利亚CLI是相当不错的。
https://stackoverflow.com/questions/45719420
复制相似问题