Node JS

FAQs

This page details the FAQs that are specific to Front End Hosting - Basic.

How do I configure Code Assembly for Front End Hosting - Basic applications?

For information about configuring Code Assembly for Front End Hosting - Basic applications, visit Deploying Static Site Generator applications.

How do I disable Code Assembly?

To disable the Code Assembly service:

  1. Log in to Cloud Platform as an administrator.
  2. Click Develop and select your application.
  3. Select App Configurations.
  4. Move the Enable Code Assembly toggle to the left.

How do I configure the package.json file?

To configure the package.json file:

  1. Insert the following configuration details at the root level of your package.json file:

    
      "extra": {       
         "acquia": {
               "code-assembly.node_version": "18",
               "code-assembly.install_command": "npm install",
               "code-assembly.build_command": "npm run build",
               "code-assembly.output_directory": "html/",
               "code-assembly.root_directory": "./"
           }
        }
    
  2. Add new properties or settings.

    To avoid syntax errors, ensure that add new properties or settings in the JSON format.

How do I configure the output directory for Front End Hosting - Basic applications?

To configure the output directory for Front End Hosting - Basic applications:

  1. In the root directory of your project, locate and open the package.json file.
  2. in the extra.acquia section, configure the code-assembly.output_directory parameter to specify the output directory.

    You can specify various output directory formats in the following ways:

    • Output Directory at SVN Repo Root Directory:

      To set the output directory at the root of your SVN repository, use the following format:

      "code-assembly.output_directory": "output_dir"
    • Output Directory with absolute directory path relative to package.json:

      To set the absolute directory path relative to package.json for the output directory, use the following format:

      "code-assembly.output_directory": "./output_dir"
    • Nested Directory path:

      If the output directory is within other directories, use the following format:

      "code-assembly.output_directory": "path/to/output_directory"

What is the importance of providing additional parameters in the package.json file?

Providing necessary parameters or ensuring that the artifact is in the default directory is important. If you do not provide additional parameters in the package.json file, the Front End Hosting - Basic application defaults to searching for the SSG artifact within the html directory. If the application does not find the artifact in the html directory, the deployment fails. 

Does Front End Hosting - Basic support Node.js site hosting?

Front End Hosting - Basic does not support Node.js site hosting.

Does Front End Hosting - Basic support SSR/ISR features?

Front End Hosting - Basic does not support SSR/ISR features.

Which Node.js versions are supported by Front End Hosting - Basic?

Front End Hosting - Basic currently supports Node.js versions that are in the active Long-Term Support (LTS) stage, specifically Node.js 18 and Node.js 20. These versions receive ongoing community updates to ensure stable and secure operations for your projects.

Which frameworks are supported by Front End Hosting - Basic?

Front End Hosting - Basic supports any NPM-compatible JavaScript framework that generates static content serviceable by an HTTP server such as Nginx.

The following table lists the frameworks that are currently compatible with Front End Hosting - Basic:

Framework

Default output directory

Angular

dist

Astro

dist

Brunch

public

Docusaurus(v1)

build

Docusaurus(v2)

build

Eleventy

_site

EmberJS

dist

Gatsby

public

Hexo

public

Ionic Angular

www

Ionic React

build

NextJS

out

NuxtJS

.output/public

Parcel

dist

PolymerJS

build/es*-bundled

Preact

build

React

build

Sanity

dist

Sapper

__sapper__/export

Scully

dist/static

Stencil

www

Storybook

storybook-static

Svelte

public

SvelteKit (v1)

output/static

UmiJs

dist

Vite

dist

Vitepress

docs/.vitepress/dist

VueJS

dist

Vuepress

src/.vuepress/dist

How do I deal with deployment failures or errors?

The following table lists the errors and their resolution:

ErrorResolution
Deployment failed because package.json was not found at the application's root.

Ensure that the package.json file is at the root of the SVN repository for correct configuration and dependency management.

Deployment failed because Code Assembly parameters in the package.json file are not set, and default output directory html is missing.

Verify that the SSG artifact is located within the html directory after a successful build, or ensure that the correct output directory is specified in the package.json file by adding the necessary assembly parameters..

Deployment failed because the specified output directory <output_directory> is missing.Ensure that the <output_directory> indicated for the output is present at the root of the SVN repository.
Deployment failed because the Code Assembly parameters are not set in the package.json file and deployment/build artifact was not found in the default output directory html.Ensure that the SSG artifact is located in the html directory denoted as the default output directory. If using a different output directory, update the package.json file to include the required assembly parameters pointing to the correct output location.
Deployment/Build artifact not found at the location defined in the package.json configuration <output_directory>.Verify that the SSG artifact is in the <output_directory> as defined in the package.json configuration.
Deployment failed because output directory size exceeds 10GiB.Front End Hosting - Basic does not support SSG artifacts larger than 10GiB. Artifacts exceeding this size are not compatible.

How do I download logs?

To download logs:

  1. Navigate to the required environment and select Logs.
  2. Click the Download tab. 
  3. Find the log list and click the kabab menu besides the entry that you want to download. 
  4. Click Download.

How do I deal with build failures or errors?

The Acquia Cloud user interface will not display build success or failures until 15th Oct 2024. To understand the cause of failure, contact your account manager or create a Support ticket.

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Acquia Help

Filter by product:

Node JS common questions