-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[V13] UTF-8 with BOM encoded schema file causes 'unsupported character' compiler error #3798
Comments
Hi @tobias-tengler thanks for the report. There's probably something in your source files that our parser could not recognize. I think you can use relay/packages/relay-compiler/README.md Lines 126 to 127 in 427c01b
If you have a smaller repro, it would help identify and fix the problem. |
Thanks @alunyov, but I couldn't gather anymore relevant information by setting the output mode to "debug": Unfortunately I can't share any of our actual code due to company policy, but I'll try to create a smaller repro. Could the issue maybe be related to styled-components? Because it also uses template literals, e.g. const NodeContainer = styled.div`
display: flex;
cursor: unset;
:hover {
cursor: unset;
}
> * + * {
border-left: 0 !important;
}
div[data-nodeid] {
border-radius: 50%;
background-color: transparent;
border: 1px solid var(--text-color);
}
`; Albeit I would expect babel-plugin-relay (or the compiler - not sure which one) to only look at the |
Probably not, I just run compiler with styled-components example. And everything seem to work fine there.
Thank you! |
Hi, |
@alunyov Sorry it took so long, but I was busy with other stuff and we just stayed on v12 for the moment. |
You can even replicate this with a fresh
"scripts": {
"relay": "relay-compiler"
}
schema {
query: Query
}
type Query {
test: String
}
"relay": {
"language": "typescript",
"src": "./src",
"schema": "./src/schema.graphql",
"exclude": [
"**/node_modules/**",
"**/__mocks__/**",
"**/__generated__/**"
],
"artifactDirectory": "./src/__generated__"
}
There are not So this should affect any new person trying out relay in this manner, right? |
I found out what the issue is. The issue is that the I'm not closing the issue for now, since I feel like the compiler should be able to handle this. |
Since I've upgraded all my
relay
packages to v13, I've been getting the following error when running therelay-compiler
:The configuration in my
package.json
file is the following:I have also setup the
babel-plugin-relay
as instructed with theartifactDirectory
.How would I go about debugging this? I tried to find whether the compiler has a verbose flag that would help me diagnose the issue, but I haven't been successful.
The text was updated successfully, but these errors were encountered: