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

monaco.languages.css === undefined #2158

Closed
ianhattendorf opened this issue Sep 26, 2020 · 3 comments
Closed

monaco.languages.css === undefined #2158

ianhattendorf opened this issue Sep 26, 2020 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug css regression

Comments

@ianhattendorf
Copy link

ianhattendorf commented Sep 26, 2020

We experienced console errors after upgrading monaco-editor from 0.20.0 to 0.21.0 in our application. We access monaco.languages.css.cssDefaults, which was failing because monaco.languages.css is undefined.

Possible cause:
It looks like esm/vs/language/css/monaco.contribution.js contains the line

languages.json = { cssDefaults: cssDefaults, lessDefaults: lessDefaults, scssDefaults: scssDefaults };

(note that it is setting languages.json and not languages.css)

monaco-editor version: 0.21.0+
Browser: Firefox/Electron
OS: macOS
Playground code that reproduces the issue:

console.log({ css: monaco.languages.css, html: monaco.languages.html });

console output:

> Object { css: undefined, html: {…} }
@rcjsuen
Copy link
Contributor

rcjsuen commented Sep 26, 2020

You might want to check with version 0.21.0 since that came out recently.

@ianhattendorf
Copy link
Author

ianhattendorf commented Sep 26, 2020

Sorry that was a typo, it should have said 0.21.0+. I've tried both 0.21.0 and 0.21.1.

This is also reproducible on https://microsoft.github.io/monaco-editor/playground.html.

@alexdima alexdima self-assigned this Sep 27, 2020
@alexdima alexdima added bug Issue identified by VS Code Team member as probable bug regression css labels Sep 27, 2020
@alexdima alexdima added this to the August 2020 (3) milestone Sep 27, 2020
@alexdima
Copy link
Member

published monaco-editor@0.21.2 with the fix.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug css regression
Projects
None yet
Development

No branches or pull requests

3 participants