React: Create a Simple JSX Element

Tell us what’s happening:
The first lesson in React and its giving a error in console saying “Uncaught ReferenceError: React is not defined”. I have not done any changes to the code.

Your code so far


const JSX = <div></div>;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36.

Challenge: Create a Simple JSX Element

Link to the challenge:
https://www.freecodecamp.org/learn/front-end-libraries/react/create-a-simple-jsx-element

Welcome @Sathyajith!

What browser version are you using?

Google Chrome Version 78.0.3904.97 (Official Build) (64-bit)

When you say console, do you mean the browser console or the FCC console which shows on the bottom?

FCC console which shows at the bottom.

Can you open Chrome’s console (Ctrl + Shft + J in Windows) and copy/paste any errors you see there?

Also, while you have the Developer Tools open, click on Network (two tabs over from Console), click the clear button and then reload the page. Make sure the status of each resource is 200 or 301. If you see anything else, take a screenshot and post it is a reply to this thread.

Thank you.

From Chrome’s Console: -
Failed to load resource: the server responded with a status of 403 (Forbidden)
(index):1 Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘https://js.stripe.com’) does not match the recipient window’s origin (‘https://www.freecodecamp.org’).
nn @ (index):1
js:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
2m.stripe.network/inner.html#url=https%3A%2F%2Fwww.freecodecamp.org%2Flearn%2Ffront-end-libraries%2Freact%2Fcreate-a-simple-jsx-element%2F&title=&referrer=https%3A%2F%2Fwww.freecodecamp.org%2Fnews&muid=8cfe5704-12a0-40c9-bb1e-83d36c72821d&sid=9f405f64-9d94-43d5-bc20-bafae89a60a4&preview=false:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
react-dom.production.min.js:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
app-64e07fb5af7ce6c339dd.js:1 Uncaught ReferenceError: React is not defined
2manifest.webmanifest:1 GET https://www.freecodecamp.org/manifest.webmanifest?_sm_byp=iVVjr5RtNpQ6GqGs 403 (Forbidden)
create-a-simple-jsx-element:1 Access to resource at ‘https://www.freecodecamp.org/manifest.webmanifest?_sm_byp=iVVjr5RtNpQ6GqGs’ (redirected from ‘https://www.freecodecamp.org/manifest.webmanifest’) from origin ‘null’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Does being logged in or out make a difference?

Are you having issues with other challenges, or just this one?

Can you open this file in the browser?
https://unpkg.com/react-dom@16.4.0/umd/react-dom.production.min.js

Does running Chrome in incognito mode change anything?

Can you try using Brave Browser and run in a private window with Tor. Using Tor gives you a different IP. Just to test if you are somehow getting blocked.

I tried logging out and logging in. Did not work.

Only the React Module i have this issue, not with any other module before this.

No cannot open the link you have mentioned. As I use a company provided laptop, few sites are blocked. Is that the reason?

Doesn’t work in Incognito mode as well.

Can’t try Brave Browser as I can’t download it on the company laptop I use.

Most likely, if they block the resources needed for the test you can’t run it.

Are you at work doing this, or just on a company laptop? You can try using a web proxy but I would strongly suggest you respect the company policies whatever they are so you don’t get in trouble.

Is there anyway I can continue learning the course(other than obviously using a personal laptop)??
Can’t use personal laptop in office space.

Can you not work through the curriculum at home?

No, I use this laptop at home also. Even using the home network, it gives the same issue.

I assume you have to log into a VPN from home when using the work laptop?

Do you not have a personal laptop you can use?

Also, make sure you have disabled any browser extensions for the freecodecamp.org site. Sometimes users have extensions which block third party urls which we use for testing purposes.