# Error on creatin forest docker image

**URL:** <https://community.forestadmin.com/t/error-on-creatin-forest-docker-image/8081>\
**Category:** Help me!\
**Created:** [May 7, 2025, 4:05pm UTC](https://community.forestadmin.com/t/error-on-creatin-forest-docker-image/8081 "2025-05-07T16:05:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adel\_de\_Clevermate](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/adel_de_clevermate/32/4608_2.png) [@Adel\_de\_Clevermate](https://community.forestadmin.com/u/Adel_de_Clevermate)\
**Post date:** [May 7, 2025, 4:05pm UTC](https://community.forestadmin.com/t/error-on-creatin-forest-docker-image/8081/1 "2025-05-07T16:05:42Z")

</div>

## Feature(s) impacted

Deploy updates of forest backend to Staging and prod.

## Observed behavior

We are using docker container for forest backend. I got an erro while rebuilding the forest image :

## Failure Logs

```javascript
Building forest-v2
Sending build context to Docker daemon 1.363MB
Step 1/8 : FROM node:18-alpine
18-alpine: Pulling from library/node
Digest: sha256:8d6421d663b4c28fd3ebc498332f249011d118945588d0a35cb9bc4b8ca09d9e
Status: Downloaded newer image for node:18-alpine
 ---> ee77c6cd7c18
Step 2/8 : WORKDIR /usr/src/app
 ---> Running in 308f67910e12
Removing intermediate container 308f67910e12
 ---> fa53cc7b1e2b
Step 3/8 : COPY package*.json ./
 ---> 62439954bf0a
Step 4/8 : RUN npm install --legacy-peer-deps --no-audit
 ---> Running in a8b236ccd7c6
npm warn deprecated lodash.omit@4.5.0: This package is deprecated. Use destructuring assignment syntax instead.
npm warn deprecated lodash.isequal@4.5.0: This package is deprecated. Use require('node:util').isDeepStrictEqual instead.
npm warn deprecated @vonage/vetch@1.8.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated superagent@8.1.2: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net

added 346 packages in 37s

40 packages are looking for funding
  run `npm fund` for details
npm notice
npm notice New major version of npm available! 10.8.2 -> 11.3.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.3.0
npm notice To update run: npm install -g npm@11.3.0
npm notice
Removing intermediate container a8b236ccd7c6
 ---> 374fc312c546
Step 5/8 : COPY . .
 ---> e4dcdde0b30e
Step 6/8 : RUN npm run build
 ---> Running in b053f7ad923c

> clevermate-v2@0.0.1 build
> tsc

index.ts(27,20): error TS2554: Expected 2 arguments, but got 1.
The command '/bin/sh -c npm run build' returned a non-zero code: 2
ERROR: Service 'forest-v2' failed to build : Build failed

```

## Context

the error indicates the error on index.ts(27,20)  
the code source :

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/7/7d4c41fac541315cde474ad96d759368068a0e9a.png)

- Project name: clevermate v2
- Environment name: TEST
- Database type: postgres

**And, if you are self-hosting your agent:**

- Agent technology: (nodejs,
- Agent (forest package) name & version (from your .lock file): “@forestadmin/agent”: “^1.58.3”,

---

<div class="post-metadata">

**Author:** ![anon7284711](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@anon7284711](https://community.forestadmin.com/u/anon7284711)\
**Post date:** [May 9, 2025, 8:22am UTC](https://community.forestadmin.com/t/error-on-creatin-forest-docker-image/8081/2 "2025-05-09T08:22:38Z")

</div>

Hello @Adel_de_Clevermate,

Sadly I am not able to help as you did not share the line number with your screenshot, could you send the whole content of your custom `index.ts` as text so we can dig into it ?

---

<div class="post-metadata">

**Author:** ![Adel\_de\_Clevermate](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/adel_de_clevermate/32/4608_2.png) [@Adel\_de\_Clevermate](https://community.forestadmin.com/u/Adel_de_Clevermate)\
**Post date:** [May 13, 2025, 4:09pm UTC](https://community.forestadmin.com/t/error-on-creatin-forest-docker-image/8081/3 "2025-05-13T16:09:44Z")

</div>

Hi @anon7284711

Thanks for your response.  
Actually the isse is resolved after adding a second argument “restartAgent” to the function dsCustom.  
Here is the full code of my function:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/3/31b0cfce7052a92e05fb5afef060385a5b967cad.png)

Bests.
