Install & Use NPM package in Version 3

Hi guys, I’ve been testing the betas of version 3 of wappler and a question has arisen, is there a possibility that in the future I can use the npm package that I need for my projects? If so, how soon will this functionality take?

What do you mean? You can already install them.

Install them yes, use modules that I want in my views no, or am I wrong?

As you just mentioned installing in the body of the message I got confused.

1 Like

Sorry I think the question is poorly elaborated, suppose I want to use an npm package in my project, I go to the site and proceed to select the one I want, then proceed to install the package in my project , what would be the next step? How do I use that package? Normally in my node projects I put a require in my javascript controller

1 Like

Ok. Now it’s pretty clear. So the basics are the same. You would also require them. But the Wapplerised way I don’t know.

The thing is that the team is still implementing the templating system where you will be able to use them for the frontend.

And for the backend I read that they will follow a different approach and make it easier to use our own code.


if there any update on this @ben can we import and use our own custom npm packages on the backend via wappler?

1 Like

As Jon has mentioned, there is nothing stopping you from doing just that. See where I have done exactly that:

Hi Pigeon…

Did you ever manage to come right?

Im in the same boat…
I use templating… eg views for my node project…
I installed a npm… but now how the @#(*#@( do i get it to run.

I see everybody is saying read the docs… read the docs… but they dont make sense… Did you ever find a video… tutorial… … eg simple examle to install the npm ics … then to run it…

I have watched loads of videos online about how they create app.js files… and bla bal… but in Wappler its different as im using the template system… and then want to access the js nmp functions via the “server side” …

Im a bit more of a visual guy… where you show me a video how its done… then i can do the rest…

Thanks Ben for this… this is great…
But how would I access these npms via the backend… server side… ??
Lets take npm ics for example… does one need to write a custome module for every npm… sorry i just want tot get my head around it…

Npm is fully integrated in Wappler 4 when using NodeJS as server model.

So you don’t have to do anything.

Hi @George thanks for the response.

Ok… but how do i access the scripts you install via npm? to use them via server connect? Do you need to create a custom module for each to use them?

I know it sound stupid … but i dont understand… ( * new to node thing )
I have googled and played about 50 youtube videos… and it all seems straight forward…
create the index.js… create the app.js or main.js file and paste the code in it… so that i get.

But in Wappler it different as we use templating with the views setup…
So i setup the node project.
I install say… npm ics … easy…
But here is where i get lost… ** yes i see documentation… but for to “stupid people” like me… here is where the missing link comes in… like we missing the steps inbetween… remember you guys write this programme… so clearly genius… you have to explain it in “stupid people terms” step by step as per your other documents… please… because i cant see a video tutorial on how to do this… … yes yes … its easy if you know what to do… :slight_smile:

now the question is… i now need to setup the js file… with the const… where do i save this to?
in the root folder? and once its saved… how do i then access this on the server side… this is the confusing part for me… does this mean for every npm you install you have to create a custom extension to access it?

or can i simple include it on my index.ejs as

there is many questions on this forum… asking the same question…

Can anybody make a how to install a npm… some thing simple just to get ones head around it… eg … npm ics… and setup the js file for server side for DUMMIES please

Well it all depends on what kind of npm module you want to use.

Is it for server side with NodeJS?

Is it for client side in the browser?

Maybe try posting a more specific question as a new topic. Like how do I use module xxx because I want to do that and that with it.