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.

ReferenceError: CanvasPattern is not defined while using standalone version

See original GitHub issue

Hi, I love this tool, but I have been having trouble while using the CLI standalone version. I have no problem using the VSCode extension, but when I try to use the render command I get an error:

➜  documentation-pintora node --version
v16.13.2
➜  documentation-pintora npm i -g @pintora/cli

changed 188 packages, and audited 189 packages in 21s

9 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
➜  documentation-pintora pintora render --input ./input.pintora --output ./output/test.png
/Users/administrador/.nvm/versions/node/v16.13.2/lib/node_modules/@pintora/cli/node_modules/@pintora/standalone/lib/pintora-standalone.umd.js:1
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t||self).pintora={})}(this,function(t){var e={__pro ....
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

ReferenceError: CanvasPattern is not defined
    at WM (/Users/administrador/.nvm/versions/node/v16.13.2/lib/node_modules/@pintora/cli/node_modules/@pintora/standalone/lib/pintora-standalone.umd.js:1:501623)
    at tE (/Users/administrador/.nvm/versions/node/v16.13.2/lib/node_modules/@pintora/cli/node_modules/@pintora/standalone/lib/pintora-standalone.umd.js:1:504326)
    at e.draw (/Users/administrador/.nvm/versions/node/v16.13.2/lib/node_modules/@pintora/cli/node_modules/@pintora/standalone/lib/pintora-standalone.umd.js:1:508895)
    at eE (/Users/administrador/.nvm/versions/node/v16.13.2/lib/node_modules/@pintora/cli/node_modules/@pintora/standalone/lib/pintora-standalone.umd.js:1:504457)
    at e.draw (/Users/administrador/.nvm/versions/node/v16.13.2/lib/node_modules/@pintora/cli/node_modules/@pintora/standalone/lib/pintora-standalone.umd.js:1:507588)
    at eE (/Users/administrador/.nvm/versions/node/v16.13.2/lib/node_modules/@pintora/cli/node_modules/@pintora/standalone/lib/pintora-standalone.umd.js:1:504457)
    at e._drawRegion (/Users/administrador/.nvm/versions/node/v16.13.2/lib/node_modules/@pintora/cli/node_modules/@pintora/standalone/lib/pintora-standalone.umd.js:1:531469)
    at Timeout._onTimeout (/Users/administrador/.nvm/versions/node/v16.13.2/lib/node_modules/@pintora/cli/node_modules/@pintora/standalone/lib/pintora-standalone.umd.js:1:531883)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)
➜  documentation-pintora 

Is it something to do with my dependencies? Is there anyway to fix it? Any help would be appreciated, and I can provide further information.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
hikerpigcommented, Sep 17, 2022

Fixed in v0.6.1

1reaction
VictorPatocommented, Sep 14, 2022

Thank you @hikerpig ! The workaround works correctly. Feel free to close this issue if you see fit.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ReferenceError: Chart is not defined - chartjs - Stack Overflow
js to my website I get an error, but when I used the graph as stand-alone program it runs smoothly without errors. I...
Read more >
CanvasGradient is not defined · Issue #45 - GitHub
Hi, I'm using this lib; I try to use charjs plugin colorschemes and ... is not defined Stack: ReferenceError: CanvasGradient is not defined....
Read more >
mozilla-central: changeset 207177 ...
Entries with a * value of |false| are cancelled and do not ... getWindowState(newWin); // verify our cookie got set during pageload let...
Read more >
JavaScript-Cookbook-2nd-Edition.pdf - Pepa
This cookbook has your back, with recipes for common tasks across the JavaScript world, whether you're working in the browser, the server, or...
Read more >
Tutorial on Creating Charts using JavaScript & HTML
An interactive tutorial on creating HTML5 JavaScript Charts using CanvasJS. ... Intentionally the Title has not been set in Axis X and Axis...
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