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

Cannot set properties of undefined (setting 'triple-quoted-string') TypeError: Cannot set properties of undefined #2511

Open
tikolakin opened this issue Apr 16, 2024 · 2 comments

Comments

@tikolakin
Copy link

Describe the bug
The latest version introduced a regression bug with prism. The 2.1.2 doesn't have this issue

Additional context
Cannot set properties of undefined (setting 'triple-quoted-string') TypeError: Cannot set properties of undefined (setting 'triple-quoted-string') at Object.extend (webpack-internal:///./node_modules/prismjs/prism.js:345:16) at eval (webpack-internal:///./node_modules/prismjs/components/prism-scala.js:1:41) at ./node_modules/prismjs/components/prism-scala.js ([https://localhost:3000/vendors-node_modules_mui_icons-material_Add_js-node_modules_mui_icons-material_Done_js-node_m-72c075.bundle.js:2299:1](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)) at webpack_require ([https://localhost:3000/main.bundle.js:5618:33](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)) at fn ([https://localhost:3000/main.bundle.js:5911:21](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)) at eval (webpack-internal:///./node_modules/redoc/bundles/redoc.browser.lib.js:41:13084) at eval (webpack-internal:///./node_modules/redoc/bundles/redoc.browser.lib.js:1819:3806) at eval (webpack-internal:///./node_modules/redoc/bundles/redoc.browser.lib.js:1819:3811) at eval (webpack-internal:///./node_modules/redoc/bundles/redoc.browser.lib.js:2:37) at eval (webpack-internal:///./node_modules/redoc/bundles/redoc.browser.lib.js:2:43)

The error is introduced in https://github.com/Redocly/redoc/releases/tag/v2.1.3 intentionally in 4fc6aa0

@saul-data
Copy link

I have experienced the same:

Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'triple-quoted-string')
    at Object.extend (prism.js:345:16)
    at eval (prism-scala.js:1:41)
    at ./node_modules/prismjs/components/prism-scala.js (vendors-node_modules_docusaurus-theme-redoc_dist-jsx_theme_ApiDoc_index_js.js:2105:1)
    at __webpack_require__ (runtime~main.js:34:32)
    at fn (runtime~main.js:334:21)
    at eval (redoc.browser.lib.js:41:12173)
    at eval (redoc.browser.lib.js:1819:3806)
    at eval (redoc.browser.lib.js:1819:3811)
    at eval (redoc.browser.lib.js:2:37)
    at eval (redoc.browser.lib.js:2:43)

@saul-data
Copy link

I managed to fix this by adding in scala as an additional language

      prism: {
        theme: prismThemes.github,
        darkTheme: prismThemes.dracula,
        additionalLanguages: ["bash", "csharp", "java", "php", "ruby", "scala"],
      },

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

No branches or pull requests

2 participants