This is my first time learning react and I’m having problems with setting up react. It worked fine in the morning, but then suddenly I started getting errors and that was when I started downloading a bunch of react and babel files, kept changing my html file and now I have no idea what to do. I feel like the error is because of the babel cdn link but without babel, my app does not work at all.
When I try to open my html file on chrome, I get this error:
browser.js:3226 Failed to load file:///Users/s/Desktop/app.js: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
transform.load @ browser.js:3226
run @ browser.js:3262
runScripts @ browser.js:3282
Does it have something to do with me not setting up react correctly?
This is how my html file looks like:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Indecision App</title> <script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script> <script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.js"></script> </head> <body> <div id="app"></div> <script type="text/babel" src="app.js"></script> </body> </html>