React is not defined

React is not defined
0

#1

Hi all.

I worked on my Front End Libraries Project Build a Marked Previewer on my machine, through Atom and finally got it running and passing all the tests. But, when I take the code back to codepen, I get a bunch of errors and, of course, it does not work.

This is my project on codepen:


I believe its because my environment setup React through rpm package manager. I thought that this line of code
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
would give me the environment setup. I guess I am wrong.

Hope somebody can help me out ! Thanks !

These are the errors I get, seen from Chrome console:
Uncaught ReferenceError: React is not defined
VM459 pen.js:86 Uncaught ReferenceError: React is not defined
VM459 pen.js:80 Uncaught ReferenceError: React is not defined
VM459 pen.js:122 Uncaught ReferenceError: React is not defined
at VM459 pen.js:122
VM472 pen.js:124 Uncaught ReferenceError: React is not defined
at VM459 pen.js:123
(anonymous) @ VM472 pen.js:124
VM480 pen.js:122 Uncaught ReferenceError: React is not defined
at VM459 pen.js:122
(anonymous) @ VM480 pen.js:122
VM475 console_runner-ce3034e6bde3912cc25f83cccb7caa2b0f976196f2f2d52303a462c826d54a73.js:1 mocha not loaded yet
(anonymous) @ VM475 console_runner-ce3034e6bde3912cc25f83cccb7caa2b0f976196f2f2d52303a462c826d54a73.js:1
runCheck @ VM477 bundle.js:271
(anonymous) @ VM477 bundle.js:274
mightThrow @ VM477 bundle.js:4076
process @ VM477 bundle.js:4144
setTimeout (async)
(anonymous) @ VM477 bundle.js:4182
fire @ VM477 bundle.js:3810
fireWith @ VM477 bundle.js:3940
fire @ VM477 bundle.js:3948
fire @ VM477 bundle.js:3810
fireWith @ VM477 bundle.js:3940
ready @ VM477 bundle.js:4420
completed @ VM477 bundle.js:4430
VM501 pen.js:124 Uncaught ReferenceError: React is not defined
at VM459 pen.js:124
(anonymous) @ VM501 pen.js:124
VM525 pen.js:122 Uncaught ReferenceError: React is not defined
at VM459 pen.js:123
(anonymous) @ VM525 pen.js:122
VM541 pen.js:124 Uncaught ReferenceError: React is not defined
at VM459 pen.js:125
(anonymous) @ VM541 pen.js:124
VM561 pen.js:122 Uncaught ReferenceError: React is not defined
at VM459 pen.js:123
(anonymous) @ VM561 pen.js:122
[Deprecation] Resource requests whose URLs contained both removed whitespace (\n, \r, \t) characters and less-than characters (<) are blocked. Please remove newlines and encode less-than characters from places like element attribute values in order to load these resources. See https://www.chromestatus.com/feature/5735596811091968 for more details.
VM584 pen.js:15 Uncaught ReferenceError: marked is not defined
at VM459 pen.js:16
(anonymous) @ VM584 pen.js:15
react-redux.min.js:1 Uncaught TypeError: Cannot read property ‘Component’ of undefined
at o (react-redux.min.js:1)
at react-redux.min.js:1
at react-redux.min.js:1
at react-redux.min.js:1
o @ react-redux.min.js:1
(anonymous) @ react-redux.min.js:1
(anonymous) @ react-redux.min.js:1
(anonymous) @ react-redux.min.js:1
pen.js:122 Uncaught ReferenceError: React is not defined
at VM459 pen.js:123


#2

Click on JS settings you don’t have react DOM and react and markedmin.js
https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.12.0/build/highlight.min.js
https://cdn.jsdelivr.net/npm/marked/marked.min.js


#3

Many thanks, solved my issue.