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.

Seeing this message while using react-monaco-editor:

There is no document formatter for 'json'-files installed. from simpleServices.js:186 .

It’s not clear how to handle support for this. Currently, I’m loading in a react app with webpack 4 (using the provided webpack plugin):

<MonacoEditor
  width="100%"
  height="100%"
  language="json"
  value={value}
  options={options}
  onChange={handleEditorChange}
  editorDidMount={editorDidMount}
  editorWillMount={editorWillMount}
 />                   

In editorDidMount:

...
setTimeout(() => {
  editor.getAction('editor.action.formatDocument').run();
}, 300);

Could you please provide clarity on what’s missing here?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
digitaltopocommented, Feb 6, 2019

Thanks, I’ll try to dig around.

0reactions
domoritzcommented, Feb 5, 2019

Please use yarn and try again. If you find out why the problem happens on npm, I would appreciate a pull request.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSON Formatter & Validator
The JSON Formatter & Validator beautifies and debugs JSON data with advanced formatting and validation algorithms.
Read more >
JSON Syntax - W3Schools
JSON - Evaluates to JavaScript Objects. The JSON format is almost identical to JavaScript objects. In JSON, keys must be strings, written with...
Read more >
Best JSON Formatter and JSON Validator: Online JSON ...
Online JSON Formatter / Beautifier and JSON Validator will format JSON data, and helps to validate, convert JSON to XML, JSON to CSV....
Read more >
JSON Formatter, Validator, Viewer, Editor & Beautifier Online ...
JSONFormatter.io is the #1 online tool to format, parse, view, validate, edit, and beautify JSON data in real time. The powerful, feature rich, ......
Read more >
Working with JSON - Learn web development | MDN
JavaScript Object Notation (JSON) is a standard text-based format for representing structured data based on JavaScript object syntax.
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