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

Can not require monaco-languageclient due to monaco is not defined #16

Closed
Phantomape opened this issue Aug 4, 2017 · 4 comments
Closed

Comments

@Phantomape
Copy link

I was trying to use this client in another project based on the react-monaco-editor. Sadly, I can't even import the language client.
Uncaught ReferenceError: monaco is not defined at Object.<anonymous> (diagnostic-collection.js:4) at __webpack_require__ (bootstrap 5001b61…:555) at fn (bootstrap 5001b61…:86) at Object.<anonymous> (languages.js:9) at __webpack_require__ (bootstrap 5001b61…:555) at fn (bootstrap 5001b61…:86) at Object.<anonymous> (index.js:12) at __webpack_require__ (bootstrap 5001b61…:555) at fn (bootstrap 5001b61…:86) at Object.<anonymous> (Monaco.js:1)
It appears that the error happened in line4 in diagnostic-collection.js when the program tried to use monaco.Uri. I am guessing there must be some place that import the monaco module, but I can not find it.

@akosyakov
Copy link
Contributor

akosyakov commented Aug 11, 2017

Monaco should be loaded before monaco-languageclient. How do you load it?

@Phantomape
Copy link
Author

@gatesn his repo for monaco languageclient solved my problem, now I can import monaco

@akosyakov
Copy link
Contributor

So react-monaco-editor with monaco-languageclient works for you nicely?

@Phantomape
Copy link
Author

yes, the monaco-languageclient works fine and I can import it right now, but since some packages like vscode-base-languageclient is compiled into es6 instead of es5, I still have some modifications to do before my example works.

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

2 participants