[英]Unable to run relay-compiler
I installed the relay for my react-native project following the steps on relay.dev .我按照relay.dev上的步骤为我的 react-native 项目安装了继电器。 Running the compiler works fine when I have an empty schema file.
当我有一个空的模式文件时,运行编译器可以正常工作。 Putting schema to the file starts throwing me this error:
将架构放入文件开始向我抛出此错误:
thread 'main' panicked at 'Expect GraphQLAsts to exist.', /home/runner/work/relay/relay/compiler/crates/relay-compiler/src/compiler.rs:335:14 note: run with
RUST_BACKTRACE=1
environment variable to display a backtrace线程“main”在“期望 GraphQLAsts 存在”时惊慌失措。/home/runner/work/relay/relay/compiler/crates/relay-compiler/src/compiler.rs:335:14 注意:在
RUST_BACKTRACE=1
环境下运行显示回溯的变量
My schema file is我的架构文件是
// relay_schema.graphql
type Query {
tasks: [TaskNode]
}
type TaskNode {
id: ID!
}
and my relay config is:我的中继配置是:
module.exports = {
// ...
// Configuration options accepted by the `relay-compiler` command-line tool and `babel-plugin-relay`.
src: './src/',
language: 'flow',
schema: './relay_schema.graphql',
exclude: ['**/node_modules/**', '**/__mocks__/**', '**/__generated__/**'],
};
I'm completely lost on what to do here我完全不知道在这里做什么
Started working after updating src to src: './'
.将 src 更新为
src: './'
后开始工作。 It's better to verify the paths such as src
and schema
.最好验证
src
和schema
等路径。 Error messages shown by the compiler are not much help when stuck here.卡在此处时,编译器显示的错误消息没有多大帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.