Yo theia-generator failed

I am trying to test a theia extension in a dev environment.
I created the following Dockerfile:

FROM node:14

RUN apt-get update \
    && apt-get install -y build-essential gcc make python3 pkg-config  libx11-dev libxkbfile-dev libsecret-1-dev \
    && apt-get autoclean -y \
    && apt-get autoremove -y \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

# install code generator for theia extensions
RUN npm install -g yo generator-theia-extension

USER node


CMD sleep infinity

And then, in the container, I execute:

$ yo theia-extension

But, I get the following errors:

warning Error running install script for optional dependency: "/workspaces/theia-dev/tree/node_modules/msgpackr-extract: Command failed.
Exit code: 126
Command: node-gyp-build-optional-packages
Directory: /workspaces/theia-dev/tree/node_modules/msgpackr-extract
[10/11] ⡀ lzma-native[8/11] ⡀ node-pty
[9/11] ⡀ @theia/ffmpeg[6/11] ⡀ electron
error /workspaces/theia-dev/tree/node_modules/lzma-native: Command failed.
Exit code: 126
Command: node-gyp-build
Directory: /workspaces/theia-dev/tree/node_modules/lzma-native`

Could anyone help me to understand what I am doing incorrect?
Many thanks!

recommend u to have a try on the node v16.15.1

Thank you for the recommendation. I have just tried, but it didn’t help.