import error
See original GitHub issueWhen I use next import I can see error and my build will fail
import quiz from './queries/quiz.graphql';
import quizzes from './queries/quizzes.graphql';
/Users/seeden/Documents/git/quizana-ui/node_modules/babel-core/lib/transformation/file/index.js:590
throw err;
^
TypeError: /src/graphql/quiz/typeDefs.js: Cannot read property 'type' of undefined
at Whitespace.getNewlinesAfter (/node_modules/babel-generator/lib/whitespace.js:50:19)
at Generator._printNewline (/node_modules/babel-generator/lib/printer.js:459:34)
at Generator.printJoin (/node_modules/babel-generator/lib/printer.js:376:32)
at Generator.printList (/node_modules/babel-generator/lib/printer.js:430:17)
at Generator.ObjectExpression (/node_modules/babel-generator/lib/generators/types.js:57:10)
at /node_modules/babel-generator/lib/printer.js:298:23
at Buffer.withSource (/node_modules/babel-generator/lib/buffer.js:168:5)
at Generator.withSource (/node_modules/babel-generator/lib/printer.js:189:15)
at Generator.print (/node_modules/babel-generator/lib/printer.js:297:10)
at Generator.ArrayExpression (/node_modules/babel-generator/lib/generators/types.js:106:12)
But when I change quiz => quizQuery evrything is fine.
import quizQuery from './queries/quiz.graphql';
import quizzes from './queries/quizzes.graphql';
I have really no idea what is wrong with names. I have same error across whole project.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:46 (23 by maintainers)
Top Results From Across the Web
How to Fix ImportError: Cannot Import Name in Python - Rollbar
The Python ImportError: cannot import name error occurs when an imported class is not accessible or is in a circular dependency.
Read more >Python Import Error (ModuleNotFoundError) - Finxter
Python's ImportError ( ModuleNotFoundError ) indicates that you tried to import a module that Python doesn't find. It can usually be eliminated by...
Read more >Python Exception Handling: ImportError and ... - Airbrake Blog
The ImportError is raised when an import statement has trouble successfully importing the specified module. Typically, such a problem is due to ...
Read more >import error: 'No module named' *does* exist - python
I set the PYTHONPATH to '.' and that solved it for me. export PYTHONPATH='.' For a one-liner you could as easily do: PYTHONPATH='....
Read more >How to catch ImportError Exception in Python? - Tutorialspoint
ImportError is raised when a module, or member of a module, cannot be imported. There are a two conditions where an ImportError might...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I made a PR to
babel-generator
to fix this issue https://github.com/babel/babel/pull/7205.I need some thumbups to make sure that a new version of Babel 6 will be released with this fix.
<del>2.0.3-beta.2 works for me, thanks 👍 </del>
Update (2017/11/27)
Sorry, it still happens, I have to add a blank line above the import to fix it.