How to include 3rd party modules in node.js code | SoloLearn: Learn to code for FREE!

+15

How to include 3rd party modules in node.js code

Is there a way to include 3rd party modules that aren't built in to the new node js playground codes? These modules would typically be installed via npm, something like express or socket.io.

8/6/2020 12:23:23 PM

Mike Perkowski

5 Answers

New Answer

+16

use npm when outside sololearn. for inside sololearn playground, maybe it is possible (through some dirty way), i ll look into it and edit my answer later. ... edit: ok so I tried this and it doesnt work (time out) seems it takes too much time to install anything. https://code.sololearn.com/cdgX24Nypu5V/?ref=app

+19

Good question... I have I actually wondered the same thing.

+12

Hmm... BroFar ChillPill Oma Falk Maybe u could help Mike Perkowski ?

+8

I could only managed to check for version of node and npm. https://code.sololearn.com/chY801KgiMGT/?ref=app I tried to installed git so that i can git clone repo later, but i get timeout with 'npm i git' command

+7

Managed to run npm init -y https://code.sololearn.com/cptkoIkf4gDg/?ref=app