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.

CodePane: TypeError: Cannot read property 'rest' of undefined

See original GitHub issue

Describe Your Environment

What version of Spectacle are you using? (can be found by running npm list spectacle)

spectacle@5.4.0

What version of React are you using? (can be found by running npm list react)

16.8.4

What browser are you using?

Chrome

Describe the Problem

Expected behavior:

Using CodePane with lang="json" should render highlighted JSON code, both running the dev server and while serving the production build.

Actual behavior:

Using CodePane with lang="json" fails in production build, although it works during npm start.

The error is:

TypeError: Cannot read property ‘rest’ of undefined at Object.tokenize (prism-core.js:251)

Additional Information

I did not encounter this problem with lang="javascript"

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
withtypescommented, Oct 5, 2019

And what is the policy to make this bug “verified”?

0reactions
kale-stewcommented, Jan 20, 2020

Closing for lack of response and because I think this was fixed in our most recent release, which updates the usage of react-live. Feel free to re-open this issue if the bug persists.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'results' of undefined
I'm a complete newby to JS. Trying to use SharePoint REST API to display a link list in a ...
Read more >
Cannot read properties of undefined' - JavaScript Debugging
How To Fix 'Uncaught TypeError : Cannot read properties of undefined ' - JavaScript Debugging.
Read more >
TypeError Cannot read properties of undefined (reading 'data')
Hello ! I have an issue that i don't understand. I searched online but no clue for my code... I tried to create...
Read more >
cannot read properties of undefined (reading 'create') node js
Here's an example of a JavaScript TypeError: Cannot read property of undefined thrown when a property is attempted to be read on an...
Read more >
React Flashcards Project - TypeError: Cannot read properties ...
TypeError : Cannot read properties of undefined (reading 'quizIds') ... Without seeing the rest of your code, it is a little hard to...
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