gpt4 book ai didi

Cannot Edit in read only editor Codesandbox(无法在只读编辑器Codesandbox中编辑)

转载 作者:bug小助手 更新时间:2023-10-25 17:30:24 35 4
gpt4 key购买 nike



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?

我正在尝试通过导入GitHub存储库来使用codesandbox。我无法编辑Package.json文件的内容。它说不能在Ready Only编辑器中编辑。如何解决这个错误?


更多回答
优秀答案推荐

step1: Ctrl+save

第一步:Ctrl+保存



step2: Refresh the webpage from the web browser.

第二步:从网页浏览器刷新网页。



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

就这样。你现在可以走了。



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.

您甚至不能编辑GitHub存储库的任何其他文件。您可以分叉该代码框,然后进行编辑。我也遇到过这种情况,它在分叉后奏效了。



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.

在我的例子中,我只是回到仪表板,并重新打开沙箱。然后我就可以像往常一样编辑它了。然而,我确实注意到GitHub的链接在那时就消失了。



In my case, I created new branch in the editor of the project, then I solved this problem.

在我的例子中,我在项目的编辑器中创建了新的分支,然后我解决了这个问题。



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.

如果你在CodeSandbox中打开仪表板,你可以从那里重新打开你的代码。打开你的代码后,点击Github图标。您可以看到“导出到Github”选项,还可以看到您所做的更改。但如果你从Github上的链接打开你的代码,你将处于只读编辑模式。



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.

如果这是第一次在CodeSandbox中打开代码(例如,您正在查看其他人的代码),那么您必须分叉它才能编辑它。



Make a new branch. Try three dot menu . . . then “Branch from current” on the mobile version.

做一个新的分支。试试三点菜单。。。然后在手机版上显示“当前分支”。


upper right three dot menu


branch from current


Or, I like git in the terminal:

或者,我喜欢航站楼里的git:



git status
# check for edits to stash or commit

# then create a new branch
# from current checked out branch

git checkout -b new-branch-name

更多回答

but why it happens , i wants to know ?

但为什么会这样,我想知道?

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com