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.

twin.macro: Invalid or unexpected token

See original GitHub issue

Hey Ben,

thank you for your work. I was really looking forward to get tailwind working with emotion 😃

My code was working quiet ok with tailwind.macro, I moved on to twin.macro and now end up with:

header.js: twin.macro: Invalid or unexpected token Learn more: https://www.npmjs.com/package/twin.macro

As soon I import the macro this error happens, I dont have to actually call it.

Unfortunately the error message does not tell me a lot about what and where sth went wrong 😦

Related PR with my migration commit: https://github.com/axe312ger/gatsby-mdx-suite/pull/28

Any ideas?

Thanks again, Benedikt

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
ben-rogersoncommented, Feb 23, 2020

ok I’ll close this for now, feel free to reopen if you come across it again

1reaction
ben-rogersoncommented, Feb 21, 2020

Thanks for your report, hopefully you can get it all sorted. Sweet starter you got there too 👌

Read more comments on GitHub >

github_iconTop Results From Across the Web

Twin.macro not working with Next.js v 11+ · Issue #606 - GitHub
macro. Just doing import tw from "twin.macro"; causes the app to crash. Next.js version 10.2.3 works fine and a workaround to get it...
Read more >
Using Twin Macro, TypeScript and jest getting error when ...
I get the following error when running my tests. TypeError: _twinMacro.default.div is not a function. I'm attempting to use babel-jest to ...
Read more >
Error Invalid ## usage expanding macro when token pasting ...
Produces on Cppcheck 1.87 : (error) failed to expand 'NUM_CHAR', Invalid ## usage when expanding 'NUM_CHAR'. Expected behaviour is that this ...
Read more >
... Unexpected token, probably type is missing? & Function ...
Mqh file when i compile i'm receive the following errors : 'create' - unexpected token, probably type is missing.
Read more >
Unexpected token: [ in statement [UPDATE ] in a seemingly ...
I have an SQL Update statement in macro that fires a Unexpected token: [ in statement [UPDATE ] error even though I don't...
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