Node_modules and package.json missing when adding NodeJS to existing site

OS info

  • Operating System : Windows 10.0.18363
  • Wappler Version : 3.3.2

Problem description

The following should include node_modules and package.json
image

as in
image

Steps to reproduce

  1. Add NodeJS to an existing site
  2. Install Node Packages

Hi Ben,
Please check George’s reply here:

Thank you Teodor, this makes it a bit awkward when I try to add a server model to the project that I started in the YouTube series for new users.

I’ll give it a bit of more thought.

You need to select the server model in the beginning, when creating your project :slight_smile:

As Firebase doesn’t support server side you will have to switch to other hosting like heroku or docker. You can just do that in your project settings targets.

Firebase is currently for static sites only. Maybe we should make that more clear.

They do have the so called “functions” for some sandboxes NodeJS execution but it is limited and we will have also to rewrite our NodeJS support to add it. Also it is pretty expensive as you are charged per call. So not sure if it is worth.

Just to clarify - the new hosting types like Firebase, Heroku and Docker - all have the same folder structure as the site root is in a subfolder of the project folder (usually www or public) so you can switch between those.

Only if you have a old fashion own hosting project where all files are just in the project root, then it will be difficult to switch as they all have to be moved to a subfolder first.

And lastly you can’t switch between Server Models - so once you choose NodeJS or PHP you have to stick with it as we do not provide conversions between to server models.

You can however go from no server model to a new one.

I will see that we add more checks for all this in the project settings.

1 Like

Actually, I wasn’t talking about Firebase, I already know its limitations. If you have a look at the original heading, you will see what I meant.

I am now wondering how I should round the New User series off. Probably by apologising for time wastage and start a new project using NodeJS called Aardvark II

aha sorry missed your point.

So you can’t just convert a Firebase project to NodeJS when adding different hosting?
I will check it out - should be possible. Is that want you want?

I see the problem now - indeed we do not generate the new package.json on project server model change afterwards. Will fix that for the next update

1 Like

Thank you @George, I have reverted to the original heading; not sure why Firebase was mentioned.

Could you please also look at dragging folders (like assets of the existing site) into the public folder, I get an error message and the files do not physically budge when I try. The HTML files are OK.

Ok already fixed the changing to NodeJS project, but what is actually the whole path that are will be taking the new users in your videos?

So you start with static Firebase site, then need templating so convert it to NodeJS but then also need hosting for it?

So choose docker? As it also has a databases. Nice for local development with databases.

And for publishing your web site you use remote e docker maybe creating a docker server at digital ocean with the $100 off people can get easy start.

Did you had something like this in mind?

1 Like