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.

Errors When Using CDN

See original GitHub issue

Code:

<!DOCTYPE html>
<html>
<head>
    <script src="https://uicdn.toast.com/editor/latest/toastui-editor-all.min.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/codemirror.min.css" />
    <link rel="stylesheet" href="https://uicdn.toast.com/editor/latest/toastui-editor.min.css" />
</head>
<body>
    <div id="editor"></div>
    <script>
        const editor = new toastui.Editor({
            el: document.querySelector('#editor'),
            height: '600px',
            initialEditType: 'markdown',
            previewStyle: 'vertical'
        });
    </script>
</body>
</html>

Errors:

Uncaught TypeError: Cannot read property 'appendChild' of null

Uncaught TypeError: toastui.Editor is not a constructor

OS: Windows 10 Browser: Chrome (latest version)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

3reactions
rrjanbiahcommented, Jan 12, 2021

FWIW, same issue and above note was very helpful https://jsfiddle.net/rrjanbiah/9ytodkbx/

1reaction
kethan1commented, Dec 13, 2020

if I move everything to the body it works

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting error messages | CDN77 documentation
This error is usually caused by a firewall on your origin server. The first thing you should do is check to see if...
Read more >
CDN Troubleshooting Guide - KeyCDN Support
Check out our CDN troubleshooting guide to find answers, guides and tools to help you resolve common troubleshooting issues.
Read more >
How To Fix CDN Error On Peacock - Alibaba Cloud
A CDN error is an error that occurs when a CDN is unable to deliver content to a user.
Read more >
Troubleshoot CDN errors - Bitnami Documentation
If using a CDN, users could experience problems with Discourse icons under Firefox. To fix this error, uncomment these lines in the Apache...
Read more >
CDN error when activate CDN - WordPress.org
Hi,. After i Activate CDN URLs, im getting error at the front page. Fatel error‎: Uncaught Error: Cannot use object of type stdClass...
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