Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read properties of undefined (reading 'tokenizePlaceholders') #2306

Closed
MikhailOkhrimenko opened this issue Jan 5, 2023 · 3 comments

Comments

@MikhailOkhrimenko
Copy link

Describe the bug

elements-api fails with "Gah. The component just crashed" when choosing a Request sample like any JavaScript, Node, C#, Java, Http, Clojure, Kotlin, PHP, Powershell, R, Ruby, Swift.

The console shows:

d94381f7cd272e904ba2.js:2 TypeError: Cannot read properties of undefined (reading 'tokenizePlaceholders')
    at web-components.min.js:2:1033816
    at Object.run (prism.js:762:1)
    at t.tokenize (web-components.min.js:2:1802839)
    at t.render (web-components.min.js:2:1803610)
    at Ua (web-components.min.js:2:1116747)
    at Ba (web-components.min.js:2:1116597)
    at Es (web-components.min.js:2:1152045)
    at dl (web-components.min.js:2:1143554)
    at fl (web-components.min.js:2:1143481)
    at rl (web-components.min.js:2:1140515)

Additional context
Environment:
Library version: 7.7.7
OS: Ubuntu 20.04.5 LTS
Browser: Chrome Version 108.0.5359.98 (Official Build) (64-bit)
Platform: Web

@mnaumanali94
Copy link
Contributor

Hey @MikhailOkhrimenko, This seems to work fine here: https://elements-demo.stoplight.io/#/operations/put-todos-id

Can we get the openapi spec that you're getting this error for? Did you try the spec in this demo?

@maria-mcparland
Copy link

For anyone else who experiences this, for us it was because we were using PrismJS somewhere else in our application and the error only surfaced when using elements package.

This issue helped us solve it: PrismJS/prism#1400

@chohmann
Copy link
Contributor

Hello!

Our team recently took over the stewardship of the elements repo.

Due the volume of un-triaged issues that are pretty old and the time it would take us to get caught up on all of them, we kindly ask that you open up a new ticket if this is still an issue you're struggling with.

If you open a new issue please include:

  • clear steps to reproduce that include example OAS specs, application setup, code, etc.
  • the error or issue you are experiencing
  • the expected behavior

We will be triaging any new tickets in a timely manner.

Thank you for understanding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants