Upgrading to 3.1.6 causes Uncaught TypeError: getVideoId is not a function
See original GitHub issueUpgrading caused this to start failing. Downgrading to 3.1.5 works fine.
const getVideoId = require('get-video-id');
export function parseVideoFromUrl(url) {
const answer = getVideoId(url);
Also tried different other ways of importing and clearing the node_modules. They made no difference.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to Handle JavaScript Uncaught TypeError: “x” is Not a ...
The Javascript TypeError: "x" is not a function occurs when calling a function on a value or object, which is not actually a...
Read more >Uncaught TypeError: undefined is not a function on loading ...
I'm not concatenating it with anything... I'm loading it with jQuery.getScript(). So... Could this be what's causing my error? Or does that not...
Read more >JavaScript: Uncaught TypeError: n is not a function
This error occurs if you try to execute a function that is not initialized or is not initialized correctly. This means that the...
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 >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 >
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 Free
Top 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

Thank you for the fix, works now!
The browser file could be converted to a UMD… and that could cover both commonjs and browser consumers… which would allow you to just have a main and module entry points… though, if you are using esm in the source, you may just want the module to point to src and only use a build step to generate the umd.