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.

fitty_module is not a function

See original GitHub issue

Hi

I’m getting TypeError: fitty_module is not a function when using Fitty with Rollup.

I’m doing this:

import fitty from 'fitty'

fitty('.my-element');

My Rollup config is essentially this.

What am I doing wrong?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
smthcommented, Aug 3, 2020

That resulted in the same error for me, but did prompt me to try the below, which seems to work. 👍

import fitty from 'fitty';

fitty.default('.my-element');
0reactions
rikschenninkcommented, Sep 9, 2020

Just tested with codesandbox but seems to work fine: https://codesandbox.io/s/fitty-demo-bzkfb?file=/src/index.js

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: myModule.function is not a function
The problem surly is the order of your define imports , the myModule is refering to other loaded module in the define ,...
Read more >
Provide uncompressed transpiled version of fitty as ... - GitHub
Currently, if I install fitty from npm and try to import like this import fitty from 'fitty' then the fitty.js file will be...
Read more >
Uncaught TypeError | Is Not A Function | Solution - YouTube
Have you encountered an error like:- Uncaught TypeError- Some selector is not a function - jQuery is not a function - owlCarousel is...
Read more >
How to fix "Uncaught TypeError: x is not a function" in JavaScript
JS Casts 01 - How to fix "Uncaught TypeError: x is not a function " in JavaScript.Visit https://javascriptcasts.com/episodes/01 for a summary ...
Read more >
How to Uncaught TypeError: x is not a function - YouTube
TypeError: "x" is not a functionThe JavaScript exception "is not a function " occurs when there was an attempt to call a value...
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