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: $ is not a function

See original GitHub issue
  • Platform: Darwin Mac-Pro.local 18.2.0 Darwin Kernel Version 18.2.0: Thu Dec 20 20:46:53 PST 2018; root:xnu-4903.241.1~1/RELEASE_X86_64 x86_64

    Linux rss 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 x86_64 x86_64 GNU/Linux

  • Mercury Parser Version: Latest. Installed with yarn global add @postlight/mercury-parser

  • Node Version (if a Node bug): v11.10.0 (I don’t think this is a node bug)

    Also shows in serverless

  • Browser Version (if a browser bug): n.a.

Expected Behavior

A parsed page and not an error

Current Behavior

$ mercury-parser https://tweakers.net/nieuws/149154/nederlandse-supercomputerbouwer-clustervision-is-failliet.html

Mercury Parser encountered a problem trying to parse that resource.

TypeError: $ is not a function
    at /Users/fred/.config/yarn/global/node_modules/@postlight/mercury-parser/dist/mercury.js:6079:12
    at Array.find (<anonymous>)
    at detectByHtml (/Users/fred/.config/yarn/global/node_modules/@postlight/mercury-parser/dist/mercury.js:6078:46)
    at getExtractor (/Users/fred/.config/yarn/global/node_modules/@postlight/mercury-parser/dist/mercury.js:6090:60)
    at Object._callee$ (/Users/fred/.config/yarn/global/node_modules/@postlight/mercury-parser/dist/mercury.js:6458:27)
    at tryCatch (/Users/fred/.config/yarn/global/node_modules/regenerator-runtime/runtime.js:62:40)
    at Generator.invoke [as _invoke] (/Users/fred/.config/yarn/global/node_modules/regenerator-runtime/runtime.js:288:22)
    at Generator.prototype.(anonymous function) [as next] (/Users/fred/.config/yarn/global/node_modules/regenerator-runtime/runtime.js:114:21)
    at asyncGeneratorStep (/Users/fred/.config/yarn/global/node_modules/@babel/runtime-corejs2/helpers/asyncToGenerator.js:5:24)
    at _next (/Users/fred/.config/yarn/global/node_modules/@babel/runtime-corejs2/helpers/asyncToGenerator.js:27:9)

If you believe this was an error, please file an issue at:

    https://github.com/postlight/mercury-parser/issues/new

Steps to Reproduce

mercury-parser https://tweakers.net/nieuws/149154/nederlandse-supercomputerbouwer-clustervision-is-failliet.html

Also in API

Not certain if this is helpful or not. This problem also happens when using the API variant of mercury. As far as I know pages from this site DID work for the online version.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:41 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
toufic-mcommented, Mar 20, 2019

The change for returning more specific errors on failed parse attempts has been merged into master and will be included in the next release.

0reactions
fappelmancommented, Mar 27, 2019

Thanks. Appreciated. I think this closes the topics for me.

Just want to point out that the non public version of mercury - the one that will soon go out of production in fact does work with the example URL. So apparently we are on a different branch.

Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
How to Handle JavaScript Uncaught TypeError: “x” is Not a ...
The Javascript error TypeError: "x" is not a function occurs when there is an attempt to call a function on a value or...
Read more >
JavaScript error: "is not a function" - Stack Overflow
Make sure that the function name you are importing matches the exact name of the function being exported from the services, helper, or...
Read more >
JavaScript: Uncaught TypeError: n is not a function
Uncaught TypeError: 'n' is not a function: This is a standard JavaScript error when trying to call a function before it is defined....
Read more >
TypeError: "x" is not a function - JavaScript
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 >

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