My npm package is 1.15.0. I install prism package used cnpm.
In prism.js, the line 5392 is the code what plsql language extend sql start define.

but the sql language defined by line 6912

So when I import prism to my code. I will get this error in console.


How to resolve this problem.
How are you bundling prism?
Based on the linked ticket, this appears to be build-related. Ideally, you should be using babel-plugin-prism to bundle prism, but without more information, I don't think this is a bug on our end.
I test this bug start at v1.11.0.
I commont all my code in index.js except import PrismJs from 'prismjs';. Then start my project and open my home page.
It always throw this exception when the version above '1.11.0'.
@jaune162 We would need the above question answered or a reproducible test case to look at before we can help you.
I seem to be having a similar issue.
(CodeSandbox to reproduce found here.)
When using prismjs/components/prism-javascript and prismjs/components/prism-jsx, I receive two different errors. (At random. Never know which one will happen.)
# Most commonly:
"Cannot set property 'comment' of undefined"
# And sometimes:
"Cannot read property 'tag' of undefined"
It seems like the comment error happens more often when prism-jsx is imported _after_ prism-javascript.
Here are a handful of screenshots to give you a quick glance at it:






@colshacol
You have to import import "prismjs/components/prism-markup"; markup before JSX (and change the highlighted language to jsx) and it will work.
Most helpful comment
@colshacol
You have to import
import "prismjs/components/prism-markup";markup before JSX (and change the highlighted language tojsx) and it will work.