报错完整信息是:Access to internal resource at 'file:///C:/manifest.json' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
翻译过来就是:CORS(同源策略)已经阻止了对本地资源 'file:///C:/manifest.json 的访问,跨域请求仅支持下列协议:http, data, chrome, chrome-extension, chrome-untrusted, https.
含义:出现了跨域问题。file文件协议无法跨域。
解决方案:最简单的方法就是下载一个VSCode插件live server,让文件运行到本地服务器上,在VSCode插件商店搜索live server点击安装,然后重启即可使用,
重启之后在VSCode,打开你要运行的文件,点击右下角” Go live ”字样就可以成功运行了。