问题场景:在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://uudwc.com/A/R6gjk
[2] visual studio code - Error loading webview: Error: Could not register service workers: TypeError: Failed to register a ServiceWorker for scope - Stack Overflow文章来源地址https://uudwc.com/A/R6gjk