4

I am trying to use codesandbox by importing the github repository. I am not able to edit the contents of the package.json file. It says cannot edit in ready only editor. How to solve this error?

Jay Rajput
  • 71
  • 2
  • 3

4 Answers4

6

step1: Ctrl+save

step2: Refresh the webpage from the web browser.

That's it. You are good to go now.

Nishant Kumar
  • 691
  • 1
  • 11
  • 31
2

You can't even edit any other files for github repository. You can fork that codesandbox and then edit. I also met that kind of situation and it worked after fork.

True
  • 696
  • 5
  • 20
2

In my case, I just went back to the Dashboard, and re-opened the sandbox. Then I was able to edit it like usual. However, I did notice that the GitHub linkage was gone then.

David Good
  • 486
  • 5
  • 8
0

If you go to the Dashboard in CodeSandbox you can re-open your code from there. After opening your code, click on the Github icon. You can see the option to Export to Github, and you can see how many changes you have made. But if you open your code from the link on Github you will be in a read-only editor mode.

If this is the first time to open the code in CodeSandbox (for example, you are viewing somebody else's code) then you have to fork it in order to edit it.

HGamble
  • 415
  • 5
  • 17