Ask coding questions

← Back to all posts
dfnk (32)

Hi, I was wondering how to import this I believe it is not working because node is not installed, how would I do that?

Answered by Scoder12 (473) [earned 5 cycles]
View Answer
dfnk (32)
Scoder12 (473)

Hi, go to the languages page and select "NodeJS" instead. Or if you really want to use the browser research webpack.

dfnk (32)

@Scoder12 How would I get the webpack?

Scoder12 (473)

@dfnk why do you need to use require in the browser? Using webpack would be pretty complicated. Webpack compiles node.js code into browser code. This would probably require you to host a node.js server as well. If you just doing simple stuff just use node unless you have a really specific reason not to do so.

RohilPatel (788)

Nodejs needs to be the language. Repl isn't very friendly with that. This is simply your web browser on a website. Go to > create new repl > select languages > Node.js