Setting up your development environment

October 8, 2024

Local JavaScript modules' prerequisites installation

Before being able to work on the JavaScript module directly, we will need:

Prerequisite version checks

First, check you have the required tools and versions:

node --version
yarn --version    

The versions should match the above prerequisites. If they don’t, you need to install them or upgrade/downgrade them. If you are using NVM (Node Version Manager), you can simply do the following:

nvm install 18
nvm use 18    

For Yarn, if you already have an existing install, you can set the version to the latest stable one by using the following command:

yarn set version stable    

With Docker

Prerequisites installation

It is recommended you upgrade it to the latest version. If you are using a command line version, use whatever package manager it was installed with to upgrade it, and if using Docker Desktop, use the Settings screen to update it to the latest version.

Jahia Docker Image Install & Start

The easiest way to install a Jahia server with GraalVM support is to use the Docker image provided by Jahia, with a version matching at least 8.2.0.x.  You can pull and start a container using the following command in a Linux/macOS Terminal or Windows Powershell:

docker run  -p 8080:8080 -p 8000:8000 -p 8101:8101 -p 10001:10001 -p 8443:8443 -p 9229:9229 -e "JPDA=true" -e "JAHIA_DISABLE_SNAPSHOTS_PULL=true" --name jahia-ee jahia/jahia-ee:8.2.0.0    

Please note that this will download (pull) about 1.3 GB of data.

Once you see the following entries in the log, this means the server has completed its startup:

2023-06-05 09:32:11,990: INFO  [EndInit] - --------------------------------------------------------------------------------------------------
2023-06-05 09:32:11,990: INFO  [EndInit] -   D E V E L O P M E N T   M O D E   A C T I V E
2023-06-05 09:32:11,991: INFO  [EndInit] -   In development mode, Jahia will allow JSPs to be modified, modules to be
2023-06-05 09:32:11,991: INFO  [EndInit] -   re-deployed and other modifications to happen immediately, but these DO have a performance impact.
2023-06-05 09:32:11,991: INFO  [EndInit] -   It is strongly recommended to switch to production mode when running performance tests or going live.
2023-06-05 09:32:11,991: INFO  [EndInit] -   The setting to change modes is called operatingMode in the jahia.properties configuration file.
2023-06-05 09:32:11,991: INFO  [EndInit] - --------------------------------------------------------------------------------------------------
2023-06-05 09:32:11,991: INFO  [EndInit] -   Modules:
2023-06-05 09:32:11,991: INFO  [EndInit] -       Started: 58
2023-06-05 09:32:11,994: INFO  [EndInit] - --------------------------------------------------------------------------------------------------
2023-06-05 09:32:12,018: INFO  [EndInit] -   Jahia 8.2.0.01.6.0 [Indigo] - Build: 3957d6e - Built on: June 3, 2023 at 2:33:20 PM UTC is now ready. Initialization completed in 72 seconds
2023-06-05 09:32:12,018: INFO  [EndInit] - --------------------------------------------------------------------------------------------------    

You should then be able to connect to your Jahia instance by opening a browser at the URL: http://localhost:8080

And login with:

  • username: root
  • password: root1234

With local JVM installation

https://academy.jahia.com/download-instructions/jahia-enterprise-installers

With cloud or other remote environments

if you already have an account on jahia.cloud, here is how to create your environment. If you don’t have an account yet and are interested in acquiring one, you may contact us here.