# Issue on compiling in a dockercontainer

**URL:** <https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060>\
**Category:** Questions\
**Tags:** deployment\
**Created:** [July 25, 2022, 8:13am UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060 "2022-07-25T08:13:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bennse](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bennse/32/15590_2.png) [@Bennse](https://community.n8n.io/u/Bennse)\
**Post date:** [July 25, 2022, 8:13am UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/1 "2022-07-25T08:13:06Z")

</div>

Hello,

I am running into a build error on n8n inside of a docker container.  
When I build it locally on my machine it works without any issues so I am quite confused on why it’s failing.  
Never made any changes to the file where it errors.

command:  
lerna exec npm run build

Errormessage:  
#24 300.5 TS2322: Type ‘Vue\<Record\<string, any\>, Record\<string, any\>, never, never, (event: string, …args: any) =\> Vue\<Record\<string, any\>, Record\<string, any\>, never, never, …\>\> | null’ is not assignable to type ‘Vue\<Record\<string, any\>, Record\<string, any\>, never, never, (event: string, …args: any) =\> Vue\<Record\<string, any\>, Record\<string, any\>, never, never, …\>\>’.  
#24 300.5 Type ‘null’ is not assignable to type ‘Vue\<Record\<string, any\>, Record\<string, any\>, never, never, (event: string, …args: any) =\> Vue\<Record\<string, any\>, Record\<string, any\>, never, never, …\>\>’.

 ![Bildschirmfoto 2022-07-25 um 10.10.28](https://europe1.discourse-cdn.com/n8n/original/2X/9/9ec81f0ab6ae380005356f71973fa1e7d7f2b02f.png)

---

<div class="post-metadata">

**Author:** ![marcus](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/marcus/32/15989_2.png) [@marcus](https://community.n8n.io/u/marcus)\
**Post date:** [July 25, 2022, 8:34am UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/2 "2022-07-25T08:34:05Z")

</div>

Hi @Bennse,  
can you post your actual docker file? Are you using our [n8n-custom docker image](https://github.com/n8n-io/n8n/tree/master/docker/images/n8n-custom) to build your custom docker image?

---

<div class="post-metadata">

**Author:** ![Bennse](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bennse/32/15590_2.png) [@Bennse](https://community.n8n.io/u/Bennse)\
**Post date:** [July 25, 2022, 8:50am UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/3 "2022-07-25T08:50:12Z")

</div>

Hi Marcus,  
if I had any information on which dockerfile is being used, I would tell you.  
I am only adding new nodes when needed.  
It always worked before even after adding a new node.  
Now I added another one and it started failing.

edit: Noone else made any changes since the last working change

---

<div class="post-metadata">

**Author:** ![marcus](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/marcus/32/15989_2.png) [@marcus](https://community.n8n.io/u/marcus)\
**Post date:** [July 25, 2022, 9:37am UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/4 "2022-07-25T09:37:41Z")

</div>

What n8n version are you using? Did you update your n8n version recently?

Can you try reinstalling npm dependencies?

```auto
lerna clean
lerna bootstrap --hoist
npm run build

```

---

<div class="post-metadata">

**Author:** ![Bennse](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bennse/32/15590_2.png) [@Bennse](https://community.n8n.io/u/Bennse)\
**Post date:** [July 25, 2022, 9:57am UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/5 "2022-07-25T09:57:01Z")

</div>

Version should be this: 0.172.0 ?  
At least that’s what the n8n process says about version.  
We did not do any recent updates (mostly because it usually broke something)

The docker is being built from scratch on every change to prevent issues so I doubt that, but I will try something.  
And as I mentioned above, locally it works without any issue.

---

<div class="post-metadata">

**Author:** ![Bennse](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bennse/32/15590_2.png) [@Bennse](https://community.n8n.io/u/Bennse)\
**Post date:** [July 25, 2022, 10:15am UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/6 "2022-07-25T10:15:47Z")

</div>

Okay so apparently it only fails inside of dockers.  
Locally outside of a docker it does not get any error (I usually don’t use a docker when testing locally due to obvious reasons).

---

<div class="post-metadata">

**Author:** ![Bennse](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bennse/32/15590_2.png) [@Bennse](https://community.n8n.io/u/Bennse)\
**Post date:** [July 25, 2022, 11:30am UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/7 "2022-07-25T11:30:49Z")

</div>

I tried with both the normal n8n dockerfile and the n8n custom one  
Not really sure what else I could check…  
especially since the Error doesn’t really tell me much

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [July 25, 2022, 11:39am UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/8 "2022-07-25T11:39:59Z")

</div>

Hey @Bennse,

Could you run us through the exact process you are taking including how you are making your build docker container? It feels like we are missing a massive chunk of information and the more detail we have the better.

---

<div class="post-metadata">

**Author:** ![Bennse](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bennse/32/15590_2.png) [@Bennse](https://community.n8n.io/u/Bennse)\
**Post date:** [July 25, 2022, 11:58am UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/9 "2022-07-25T11:58:18Z")

</div>

Hi @Jon

For testing the dockerbuild locally I used the n8n custom dockerfile provided by you with the given commandline input: docker build -t n8n-custom -f docker/images/n8n-custom/Dockerfile .

I am not really sure what information you need tbh as I am not taking any weird steps or such.  
All I did was adding a new node the same way I did before which never caused any issue (and since running n8n locally outside of a docker works… I am really not sure what is wrong or where I could have failed)  
To run it locally I use: npm run build && ./packages/cli/bin/n8n start

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [July 25, 2022, 12:09pm UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/10 "2022-07-25T12:09:37Z")

</div>

Hey @Bennse,

Perfect, So how are you adding your node to the docker image or is it just part of the n8n node folder directly rather than an npm package?

Have you tried cloning the main repo and just running the build command to see if that works?

---

<div class="post-metadata">

**Author:** ![Bennse](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bennse/32/15590_2.png) [@Bennse](https://community.n8n.io/u/Bennse)\
**Post date:** [July 25, 2022, 12:35pm UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/11 "2022-07-25T12:35:31Z")

</div>

Hi @Jon ,  
I added the node directly to the n8n node folder(s), not as npm package.  
The branch that does not have the new node does work.

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [July 25, 2022, 1:16pm UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/12 "2022-07-25T13:16:39Z")

</div>

Hey @Bennse,

That is interesting it almost sounds like it is something with the changes in your node but it works locally 🤔

What else is in the error? There could be something else earlier that point towards the issue.

---

<div class="post-metadata">

**Author:** ![Bennse](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bennse/32/15590_2.png) [@Bennse](https://community.n8n.io/u/Bennse)\
**Post date:** [July 25, 2022, 1:20pm UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/13 "2022-07-25T13:20:26Z")

</div>

Hey @Jon

exactly, that’s why I am really confused tbh.  
Haven’t found anything else that looks like an error earlier in the console, checked multiple times.  
Just the usual docker building-log where it goes through every step.

So the screenshot I posted is everything

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [July 25, 2022, 1:42pm UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/14 "2022-07-25T13:42:24Z")

</div>

Hey @Bennse,

The bit with an issue may not say error, What is the node you are adding doing?

---

<div class="post-metadata">

**Author:** ![Bennse](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bennse/32/15590_2.png) [@Bennse](https://community.n8n.io/u/Bennse)\
**Post date:** [July 25, 2022, 1:55pm UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/15 "2022-07-25T13:55:52Z")

</div>

Hey @Jon ,

the node is for Jira Tempo API mainly to request the worklogs for specific tickets/projects ([REST API documentation](https://apidocs.tempo.io/#worklogs)) (also fully works locally besides the issues that are on the side of the Tempo API)

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [July 25, 2022, 2:00pm UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/16 "2022-07-25T14:00:11Z")

</div>

Hey @Bennse,

The only thing I can think of is there is something local on your machine that is needed which isn’t being added to the container or installed. Are you using any extra packages?

Although it looks like the failure is probably earlier on, Can we get the full output?

---

<div class="post-metadata">

**Author:** ![Bennse](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bennse/32/15590_2.png) [@Bennse](https://community.n8n.io/u/Bennse)\
**Post date:** [July 25, 2022, 2:09pm UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/17 "2022-07-25T14:09:06Z")

</div>

Hey @Jon,

I haven’t added any new package, no.  
Due to some secrets I will have to check again which area I can send. Will be tomorrow though due to my workday being over for now.

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [July 25, 2022, 2:11pm UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/18 "2022-07-25T14:11:58Z")

</div>

Hey @Bennse,

No problem, Ideally we would need all of the file but anything sensitive in the log file you can just replace with or similar.

---

<div class="post-metadata">

**Author:** ![Bennse](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bennse/32/15590_2.png) [@Bennse](https://community.n8n.io/u/Bennse)\
**Post date:** [July 26, 2022, 6:40am UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/19 "2022-07-26T06:40:33Z")

</div>

Hello,

I am back with the adjusted dockerlog.  
Replaced all the sensitive data.

Pulling secret + docker build --file=./docker/images/n8n-custom/Dockerfile --tag=secret --build-arg BUILDKIT\_INLINE\_CACHE=1 --cache-from=secret --progress=plain .

#1 [internal] load build definition from Dockerfile  
#1 docker sha  
#1 transferring dockerfile: 1.61kB 0.1s done  
#1 DONE 0.1s

#2 [internal] load .dockerignore  
#2 docker sha  
#2 transferring context: 32B 0.0s  
#2 transferring context: 93B 0.1s done  
#2 DONE 0.1s

#3 [internal] load metadata for [Docker Hub Container Image Library | App Containerization](http://docker.io/library/node:16-alpine)  
#3 docker sha  
#3 DONE 0.3s

#11 [internal] load build context  
#11 docker sha  
#11 DONE 0.0s

#4 [stage-1 1/7] FROM [Docker Hub Container Image Library | App Containerization](http://docker.io/library/node:16-alpine@docker) sha  
#4 docker sha  
#4 DONE 0.0s

#28 [auth] secret  
#28 docker sha  
#28 DONE 0.0s

#27 importing cache manifest from secret  
#27 docker sha  
#27 No Cache found

#5 [stage-1 2/7] RUN apk add --update graphicsmagick tzdata tini su-exec git  
#5 docker sha  
#5 CACHED

#6 [stage-1 3/7] WORKDIR /data  
#6 docker sha  
#6 CACHED

#7 [stage-1 4/7] RUN npm\_config\_user=root npm install -g full-icu  
#7 docker sha  
#7 CACHED

#8 [stage-1 5/7] RUN apk --no-cache add --virtual fonts msttcorefonts-installer fontconfig && update-ms-fonts && fc-cache -f && apk del fonts && find /usr/share/fonts/truetype/msttcorefonts/ -type l -exec unlink {} ;  
#8 docker sha  
#8 CACHED

#11 [internal] load build context  
#11 docker sha  
#11 transferring context: 17.87MB 1.0s done  
#11 DONE 1.0s

#15 [builder 7/16] COPY packages/core/ ./packages/core/  
#15 docker sha  
#15 CACHED

#10 [builder 3/16] WORKDIR /data  
#10 docker sha  
#10 CACHED

#17 [builder 9/16] COPY packages/editor-ui/ ./packages/editor-ui/  
#17 docker sha  
#17 CACHED

#9 [builder 2/16] RUN apk --update add --virtual build-dependencies python3 build-base ca-certificates && npm\_config\_user=root npm install -g lerna  
#9 docker sha  
#9 CACHED

#16 [builder 8/16] COPY packages/design-system/ ./packages/design-system/  
#16 docker sha  
#16 CACHED

#18 [builder 10/16] COPY packages/nodes-base/ ./packages/nodes-base/  
#18 docker sha  
#18 CACHED

#20 [builder 12/16] RUN rm -rf node\_modules packages/_/node\_modules packages/_/dist  
#20 docker sha  
#20 CACHED

#21 [builder 13/16] RUN npm config set legacy-peer-deps true  
#21 docker sha  
#21 CACHED

#13 [builder 5/16] COPY package.json .  
#13 docker sha  
#13 CACHED

#14 [builder 6/16] COPY packages/cli/ ./packages/cli/  
#14 docker sha  
#14 CACHED

#12 [builder 4/16] COPY lerna.json .  
#12 docker sha  
#12 CACHED

#22 [builder 14/16] RUN npm install --production --loglevel notice  
#22 docker sha  
#22 CACHED

#19 [builder 11/16] COPY packages/workflow/ ./packages/workflow/  
#19 docker sha  
#19 CACHED

#23 [builder 15/16] RUN lerna bootstrap --hoist – --production  
#23 docker sha  
#23 CACHED

#24 [builder 16/16] RUN npm run build  
#24 docker sha  
#24 1.620  
#24 1.620 \> n8n@0.168.2 build  
#24 1.620 \> lerna exec npm run build  
#24 1.620  
#24 2.478 lerna notice cli v5.2.0  
#24 2.482 lerna info versioning independent  
#24 2.577 lerna info Executing command in 6 packages: “npm run build”  
#24 3.346  
#24 3.346 \> n8n-design-system@0.17.0 build  
#24 3.346 \> npm run build:theme  
#24 3.346  
#24 3.349  
#24 3.349 \> n8n-workflow@0.95.0 build  
#24 3.349 \> tsc  
#24 3.349  
#24 4.090  
#24 4.090 \> n8n-design-system@0.17.0 build:theme  
#24 4.090 \> gulp build:theme  
#24 4.090  
#24 9.424 [07:52:40] Using gulpfile /data/packages/design-system/gulpfile.js  
#24 9.426 [07:52:40] Starting ‘build:theme’…  
#24 9.429 [07:52:40] Starting ‘compileTheme’…  
#24 19.55 [07:52:51] Finished ‘compileTheme’ after 10 s  
#24 19.55 [07:52:51] Starting ‘copyThemeFonts’…  
#24 19.62 [07:52:51] Finished ‘copyThemeFonts’ after 77 ms  
#24 19.63 [07:52:51] Finished ‘build:theme’ after 10 s  
#24 24.70  
#24 24.70 \> n8n-core@0.113.0 build  
#24 24.70 \> tsc  
#24 24.70  
#24 24.71  
#24 24.71 \> n8n-editor-ui@0.139.0 build  
#24 24.71 \> cross-env secret vue-cli-service build  
#24 24.71  
#24 29.41  
#24 29.41 - Building for production…  
#24 49.52  
#24 49.52 \> n8n-nodes-base@0.170.0 build  
#24 49.52 \> tsc && gulp build:icons && gulp build:translations  
#24 49.52  
#24 195.4 [07:55:46] Using gulpfile /data/packages/nodes-base/gulpfile.js  
#24 195.4 [07:55:46] Starting ‘build:icons’…  
#24 196.5 [07:55:47] Finished ‘build:icons’ after 1.13 s  
#24 198.3 [07:55:49] Using gulpfile /data/packages/nodes-base/gulpfile.js  
#24 198.3 [07:55:49] Starting ‘build:translations’…  
#24 198.3 Default locale set to: en  
#24 198.3 No translation required - Skipping translations build…  
#24 198.3 [07:55:49] Finished ‘build:translations’ after 3.98 ms  
#24 218.5  
#24 300.5 ERROR Failed to compile with 1 error7:57:31 AM  
#24 300.5  
#24 300.5 error in src/components/mixins/emitter.ts:26:5  
#24 300.5  
#24 300.5 TS2322: Type ‘Vue\<Record\<string, any\>, Record\<string, any\>, never, never, (event: string, …args: any) =\> Vue\<Record\<string, any\>, Record\<string, any\>, never, never, …\>\> | null’ is not assignable to type ‘Vue\<Record\<string, any\>, Record\<string, any\>, never, never, (event: string, …args: any) =\> Vue\<Record\<string, any\>, Record\<string, any\>, never, never, …\>\>’.

#24 300.5 Type ‘null’ is not assignable to type ‘Vue\<Record\<string, any\>, Record\<string, any\>, never, never, (event: string, …args: any) =\> Vue\<Record\<string, any\>, Record\<string, any\>, never, never, …\>\>’.

## #24 300.5 24 #24 300.5 25 while (parent && (!name || name !== componentName)) { #24 300.5 \> 26 parent = parent.$parent; #24 300.5 | ^^^^^^ #24 300.5 27 #24 300.5 28 if (parent) { #24 300.5 29 name = parent.$options.name; #24 300.5 #24 301.9 Error parsing bundle asset “/data/packages/editor-ui/dist/js/app.227030c2.js”: no such file #24 301.9 Error parsing bundle asset “/data/packages/editor-ui/dist/js/chunk-2d2073c1.0092aa08.js”: no such file #24 301.9 Error parsing bundle asset “/data/packages/editor-ui/dist/js/chunk-2d22d3e6.63d9eef8.js”: no such file #24 301.9 Error parsing bundle asset “/data/packages/editor-ui/dist/js/chunk-4301fce8.9b17b8ed.js”: no such file #24 301.9 Error parsing bundle asset “/data/packages/editor-ui/dist/js/chunk-b1e1f7c0.ec07c689.js”: no such file #24 301.9 Error parsing bundle asset “/data/packages/editor-ui/dist/js/chunk-vendors.d75cd94f.js”: no such file #24 301.9 Error parsing bundle asset “/data/packages/editor-ui/dist/editor.worker.js”: no such file #24 301.9 Error parsing bundle asset “/data/packages/editor-ui/dist/json.worker.js”: no such file #24 301.9 Error parsing bundle asset “/data/packages/editor-ui/dist/ts.worker.js”: no such file #24 301.9 #24 301.9 No bundles were parsed. Analyzer will show only original module sizes from stats file. #24 301.9 #24 302.1 Webpack Bundle Analyzer saved report to /data/packages/editor-ui/dist/report.html #24 302.1 ERROR Build failed with errors. #24 302.2 lerna ERR! npm run build exited 1 in ‘n8n-editor-ui’ #24 302.2 lerna ERR! npm run build exited 1 in ‘n8n-editor-ui’ #24 ERROR: executor failed running [/bin/sh -c npm run build]: exit code: 1

> importing cache manifest from secret

* * *

* * *

> [builder 16/16] RUN npm run build:

* * *

executor failed running [/bin/sh -c npm run build]: exit code: 1  
Exited with code exit status 1

---

<div class="post-metadata">

**Author:** ![Bennse](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bennse/32/15590_2.png) [@Bennse](https://community.n8n.io/u/Bennse)\
**Post date:** [July 26, 2022, 8:32am UTC](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060/20 "2022-07-26T08:32:04Z")

</div>

Heyo,  
I found out something about the issue again.  
It only fails on productionlevel.

RUN npm install --production --loglevel notice  
RUN lerna clean  
RUN lerna bootstrap --hoist – --production  
RUN npm run build

even locally outside of docker, when using those 4 lines locally to build it.

Also, VS Code is pointing out the error in the emitter.ts file (where the error is coming from) without any changes made to it from our side

 ![Bildschirmfoto 2022-07-26 um 10.27.50](https://europe1.discourse-cdn.com/n8n/original/2X/d/dd23e7bb890a889022b7267920edaa06788063f4.png)

[Next page](https://community.n8n.io/t/issue-on-compiling-in-a-dockercontainer/16060.md?page=2)
