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.

Errors when importing `glamorous` in tsx

See original GitHub issue

Expected behaviour:

Importing glamorous works

Actual behaviour:

Importing glamorous causes the preview to break with

Fatal error:
Cannot read property 'moduleObj' of undefined
Loading index.tsx
Loading app

And after refreshing the preview

Fatal error:
Cannot read property 'isRequired' of undefined
Evaluating https://unpkg.com/glamorous@4.1.0/dist/glamorous.cjs.js
Evaluating index.tsx
Loading app

Reproduction:

https://stackblitz.com/edit/react-ts-u9qiu6

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
EricSimonscommented, Aug 7, 2017

Thanks man!! Lmk if you run into any other problems — I’m going to clean up the error handling a bit tmrw, as the Cannot read property 'moduleObj' of undefined shouldn’t have ever shown up (it’s a bug on our side of things)

1reaction
luke-johncommented, Aug 7, 2017

Ahh, thank you very much for that.

Really loving the look of stackblitz 👍 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Project references: error when importing `tsx` file in referenced ...
I am able to workaround the error by adding "jsx": "react" to app/tsconfig.json , but this feels redundant. The file I am importing...
Read more >
import jsx file in tsx compilation error - reactjs - Stack Overflow
I am trying to import jsx file in tsx file. This is causing the error. error TS2604: JSX element type 'Test' does not...
Read more >
An import path cannot end with a '.tsx' extension in TS
The error "An import path cannot end with a '.tsx' extension" occurs when we include the extension when importing TypeScript files in a...
Read more >
TypeScript intellisense in VS2019 falsely showing error "... can ...
In Visual Studio 2019, Intellisense is falsely filling the error list with "…can only be default-imported using the 'esModuleInterop' flag when importing ......
Read more >
Cannot use import statement outside a module [React ...
When building a web application, you may encounter the SyntaxError: Cannot use import statement outside a module error. This error might be ...
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