question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Syntax Error: Unexpected <EOF>

See original GitHub issue

Hey, I seem to get getting this error. I’m using react native, expo to be specific. I know it works with expo because this guy seems to be using it https://github.com/fabien0102/climbing-app

image

I dont think i’m doing anything wrong, just importing the .graphql file.

query userProfiles($userId: String!) {
  user(id: $userId) {
    id
    name
    image
}

when i import it in my component, i get the error.

import userProfiles from '../queries/userProfiles.graphql'```

Goes away when i remove the import

babel.rc

{
  "presets": ["babel-preset-expo"],
  "plugins": ["babel-plugin-inline-import-graphql-ast"],
  "env": {
    "development": {
      "plugins": ["transform-react-jsx-source"]
    }
  }
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
detrohuttcommented, Feb 7, 2018

Great! I’ll close this for now, but if you run into any more problems let me know.

1reaction
farzdcommented, Feb 7, 2018

Hey, thanks a million. Appreciate it It didn’t work unfortunately. I’m on OSX [El Capitan]

error is different though Syntax Error: Expected name, found <EOF>

EDIT: i just restarted expo and simulator and it seems to work 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Unexpected EOF While Parsing: The Way To Fix It
The error “unexpected EOF while parsing” occurs when the interpreter reaches the end of a Python file before every code block is complete....
Read more >
SyntaxError: unexpected EOF while parsing - Stack Overflow
The SyntaxError: unexpected EOF while parsing means that the end of your source code was reached before all code blocks were completed.
Read more >
SyntaxError: unexpected EOF while parsing - LearnDataSci
EOF stands for "end of file," and this syntax error occurs when Python detects an unfinished statement or block of code. This can...
Read more >
Python SyntaxError: unexpected EOF while parsing Solution
The “SyntaxError: unexpected EOF while parsing” error occurs when the end of your source code is reached before all code is executed. This ......
Read more >
SyntaxError: unexpected EOF while parsing - STechies
The SyntaxError: unexpected EOF while parsing error also is known as parsing error where the control in the program/code reaches to the end,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found