问题场景:在vscode上安装ployglot Notebook插件,创建了了一些*.dib和*.ipynb文件,然后在vscode中再次点击打开的时候
报错:Error loading webview: Error: Could not register service workers: TypeError: Failed to register a ServiceWorker for scope
解决方案:
方案1:重启vscode
方案2:
(1)关闭vscode后,按WIN + R,输入cmd,打开终端,然后输入命令
code --no-sandbox
(3)重启vscode
方案3:
(1)关闭vscode以及在task Manager里面关闭vscode相关的进程
(2)切换到 C:\Users\<user_name>\AppData\Roaming\Code
删除里面的cache目录
-
Cache
-
CachedData
-
CachedExtensions
-
CachedExtensionVSIXs (if this folder exists)
-
Code Cache
(3)重启vscode
参考链接:
[1] vscode加载web 视图,报错:“Error: Could not register serviceworkers: InvalidstateError: Failed to regist“_vscode加载web视图时出错_南城猿的博客-CSDN博客文章来源:https://www.toymoban.com/news/detail-719176.html
[2] visual studio code - Error loading webview: Error: Could not register service workers: TypeError: Failed to register a ServiceWorker for scope - Stack Overflow文章来源地址https://www.toymoban.com/news/detail-719176.html
到了这里,关于Error:Vscode Web View Could not Initialize的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!