我得到这个错误:
在'file:///Users/jonathanguerero/Documents/GitHub/scoreboard_proj/app.js'从origin 'null'访问XMLHttpRequest已被CORS策略阻止:跨源请求仅支持协议方案:http, data, chrome, chrome-extension, chrome-untrusted, https.
这是我的代码
<html>
<head>
<meta charset="utf-8">
<title>Scoreboard</title>
<link rel="stylesheet" href="./app.css" />
</head>
<body>
<div id="root"></div>
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
<script type="text/babel" src="./app.js"></script>
</body>
</html>```
在编辑器上安装Live服务器扩展,然后运行它。它会工作的