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.

I got errors when edit json file. When editing plain text files works fine.

json_error

[Vue warn]: Invalid prop: type check failed for prop "value". Expected String, got Object.

found in

---> <Codemirror>
       <TextEdit> at node_modules/laravel-file-manager/src/components/modals/views/TextEdit.vue
         <Modal> at node_modules/laravel-file-manager/src/components/modals/Modal.vue
           <FileManager> at node_modules/laravel-file-manager/src/FileManager.vue
             <Root>
warn @ app.js:24080
assertProp @ app.js:25119
validateProp @ app.js:25047
updateChildComponent @ app.js:26336
prepatch @ app.js:27631
patchVnode @ app.js:29412
updateChildren @ app.js:29309
patchVnode @ app.js:29423
updateChildren @ app.js:29309
patchVnode @ app.js:29423
patch @ app.js:29583
Vue._update @ app.js:26157
updateComponent @ app.js:26275
get @ app.js:26629
run @ app.js:26706
flushSchedulerQueue @ app.js:26468
(anonymous) @ app.js:25324
flushCallbacks @ app.js:25245
app.js:24080 [Vue warn]: Error in callback for watcher "value": "TypeError: string.split is not a function"

found in

---> <Codemirror>
       <TextEdit> at node_modules/laravel-file-manager/src/components/modals/views/TextEdit.vue
         <Modal> at node_modules/laravel-file-manager/src/components/modals/Modal.vue
           <FileManager> at node_modules/laravel-file-manager/src/FileManager.vue
             <Root>
warn @ app.js:24080
logError @ app.js:25224
globalHandleError @ app.js:25219
handleError @ app.js:25208
run @ app.js:26722
flushSchedulerQueue @ app.js:26468
(anonymous) @ app.js:25324
flushCallbacks @ app.js:25245
app.js:25228 TypeError: string.split is not a function
    at splitLinesAuto (app.js:1456)
    at Doc.splitLines (app.js:6639)
    at Doc.<anonymous> (app.js:6288)
    at Doc.setValue (app.js:4103)
    at CodeMirror.setValue (app.js:9866)
    at VueComponent.handerCodeChange (app.js:80291)
    at VueComponent.value (app.js:80291)
    at Watcher.run (app.js:26720)
    at flushSchedulerQueue (app.js:26468)
    at Array.<anonymous> (app.js:25324)

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
alexusmaicommented, Dec 7, 2018

Yes, it would be nice to deal with this problem and make editing json-files. I will try to do something when I have free time.

0reactions
et-nikcommented, Dec 7, 2018

Maybe add checking and deny user edit json? Close editor on error? I get the impression that the file is empty if I don’t look at the console and don`t see the error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSON Online Validator and Formatter - JSON Lint
JSONLint is an online editor, validator, and reformat tool for JSON, which allows you to directly type your code, copy and paste it,...
Read more >
Editing a json file causes an error - Visual Studio Feedback
When I try to edit a json file this error appears: "An exception has been encountered. This may be caused by an extension."...
Read more >
How to Fix the Invalid JSON Error in WordPress? - Rank Math
The error “Updating failed. The response is not a valid JSON response” usually occurs while you're working on your content in the WordPress...
Read more >
JSON error handling
You can create customized JSON errors using the Set Message filter with the JSON Error filter. The Set Message filter can change the...
Read more >
How to Fix "Updating Failed. The Response is Not a Valid ...
Did you just come across the “Updating failed. The response is not a valid JSON response.” error when working in the WordPress block...
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