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.

anchor is not defined

See original GitHub issue
$percollate pdf --output 1.pdf https://reactjs.org/docs/hello-world.html
Fetching: https://reactjs.org/docs/hello-world.html
Enhancing web page
(node:10750) UnhandledPromiseRejectionWarning: ReferenceError: anchor is not defined
    at Array.from.forEach.img (/usr/lib/node_modules/percollate/src/enhancements.js:12:18)
    at Array.forEach (<anonymous>)
    at imagesAtFullSize (/usr/lib/node_modules/percollate/src/enhancements.js:11:57)
    at cleanup (/usr/lib/node_modules/percollate/index.js:40:2)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:10750) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:10750) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
pticacommented, Oct 10, 2018

at ubuntu server of mine I’ve manually removed the apparently old install of 0.1.5 and did fresh install via yarn and voila: it just works! (after adding some missing libs for pupeteer using https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#chrome-headless-doesnt-launch)

I like the idea very much as pdfs on my reader means much less distractions and is easy to carry around and slowly digest 😃, thank you!

1reaction
danburzocommented, Oct 9, 2018

Thanks for reporting! Indeed there was a bug with that version, which I had fixed in the meantime. Glad to hear it worked out in the end. I usually install node from with the macOS installer directly, having had trouble with both brew and other methods.

I’ve updated the Readme to reflect what I think is the correct way of upgrading to the latest version using yarn:

yarn global upgrade --latest percollate

I’ve tested with the example page and it works on percollate@0.2.4, but it seems I still have to write a few more styles for everything on that page to show up correctly in the PDF.

Will get back with updates! ✌️ D.

Read more comments on GitHub >

github_iconTop Results From Across the Web

anchor - Error: ANCHOR_PROVIDER_URL is not defined
Try creating a .env and set ANCHOR_PROVIDER_URL as http://localhost:8899 in case of localnet, or use the devnet/mainnet RPC-API endpoints if you're not ...
Read more >
"is not a function" error with a function on an anchor tag
You have to check what's in onPageChange variable. Seems like it's not a function, it might be even undefined .
Read more >
<a>: The Anchor element - HTML: HyperText Markup Language
The HTML element (or anchor element), with its href attribute, creates a hyperlink to web pages, files, email addresses, locations in the ...
Read more >
Links in HTML documents - W3C
Links and anchors defined by the A element must not be nested; an A element must not contain any other A elements. Since...
Read more >
Python - Tkinter Anchors
Anchors are used to define where text is positioned relative to a reference point. Here is list of possible constants, which can 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