我在 Express 上有 Apollo Graph 的后端。
在我的客户端 React 应用程序中,我下一步要做的是:
apollo codegen:generate --excludes=node_modules/* --includes=**/*.tsx --target typescript --tagName gql --outputFlat generate
Run Code Online (Sandbox Code Playgroud)
我等待生成文件夹,但此命令给出了下一个错误:
Error: There are multiple definitions for the herewas operation.
All operations in a project must have unique names.
If generating types, only the types for the first definition
found will be generated.at GraphQLClientProject.checkForDuplicateOperations
(....\node_modules\apollo\node_modules\apollo-language-server\lib\project\base.js:129:31)
.........
.........
Generating query files with 'typescript' target
> Apollo does not support anonymous operations
Run Code Online (Sandbox Code Playgroud)
我还有 apollo.config.js:
module.exports = {
client: {
service: {
url: "http://localhost:4000/graphql" …Run Code Online (Sandbox Code Playgroud) 我做了npm build,然后我得到错误:
ERROR in .../PublishingFilter.css (./node_modules/css-loader/dist/cjs.js!./src/shared/publishingFilter/PublishingFilter.css)
Module build failed (from ./node_modules/css-loader/dist/cjs.js):
.../node_modules/css-loader/dist/plugins/postcss-icss-parser.js:34
accumulator[normalizedUrl] = { ...accumulator[normalizedUrl],
Run Code Online (Sandbox Code Playgroud)
节点 v6.17.1
npm v3.10.10