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.

TypeError: (0, _.css) is not a function.

See original GitHub issue

I am getting this error all of a sudden using dripsy 2.2.0 and even after updating to 2.3.6. The error occurs in the map-props.ts file in the core css dripsy folder.

The solution I’ve found is to change that line above to ./ instead of just .

https://github.com/nandorojo/dripsy/blob/baae1f2a99730153a25b61819d0a11564c9f5a06/packages/core/src/css/map-props.ts#L2

I’ve looked up module resolution stuff and found that ./ points to the current location while . points to “this location”. I’m unsure what exactly the difference is besides maybe different behavior from javascript. I’m also confused as to why this happens only for this specific file where . is used in other files in the project. As well as the fact that this only recently happened with no changes to my codebase.

I figured I’d throw this up until I find if there’s something I’m missing with module resolution because I can’t really believe it would be the libraries fault.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nandorojocommented, Sep 16, 2021

Interesting. Yeah I haven’t actually had Dripsy issues from this. Feel free to PR those imports though with ./index

0reactions
shamblidcommented, Sep 16, 2021

Timing is probably coincidence though I’ve had this problem for over a week at least, I just haven’t looked too deeply into it until now.

But yeah seems like we have the same exact issue. I found some stack overflows about the . vs ./ here: https://stackoverflow.com/questions/296873/how-to-set-relative-path-to-current-folder https://stackoverflow.com/questions/7591240/what-does-dot-slash-refer-to-in-terms-of-an-html-file-path-location

Not sure if they are related here but nice context and they mention that ./ only works in non-strict mode which I’m unsure if that is affected by metro.

Read more comments on GitHub >

github_iconTop Results From Across the Web

uncaught typeerror: $(...)[0].css is not a function in jQuery
Because $("li")[0] returns a native HTML element. See my answer for the code example :) – Balastrong. Jul 26, 2020 at 13:43.
Read more >
TypeError: (0 , _styledComponents.css) is not a function #46
Hello, I'm using grommet-icons in a file that is causing my Jest tests to fail. The tests pass when the component that is...
Read more >
"css is not a function" - jQuery Forum
I am having a problem with a function I am trying to write. I can't change the CSS on the second list item...
Read more >
TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
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...
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