theia-ide / theia-apps

Theia applications examples - docker images, desktop apps, packagings
Apache License 2.0
1.04k stars 344 forks source link

Faild to build image . Error "Failed to resolve module: filenamify" #502

Closed gomlangle closed 2 years ago

gomlangle commented 2 years ago

When I tried to compile theiaide/theia-go:next using docker, an error occurred, as follows: f987a9472c2a6ee367ab49af6022d35

Details: [4/4] Building fresh packages... Done in 554.87s. yarn run v1.22.4 $ /home/theia/node_modules/.bin/theia build Failed to resolve module: filenamify info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Error: webpack exited with an unexpected signal: SIGKILL. at ChildProcess. (/home/theia/node_modules/@theia/application-manager/lib/application-process.js:59:28) at ChildProcess.emit (events.js:315:20) at maybeClose (internal/child_process.js:1021:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) error Command failed with exit code 1. The command '/bin/sh -c yarn --pure-lockfile && NODE_OPTIONS="--max_old_space_size=4096" yarn theia build && yarn theia download:plugins && yarn --production && yarn autoclean --init && echo .ts >> .yarnclean && echo .ts.map >> .yarnclean && echo .spec. >> .yarnclean && yarn autoclean --force && yarn cache clean' returned a non-zero code: 1

I tried to compile other images again "docker build --build-arg version=next. -T theiaide/theia-python:next". I also encountered the same problem

My System Info: CentOS Linux release 7.6.1810 (Core) Linux guominglong 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

docker info: Docker version 20.10.10, build b485636

Analyze the reasons: @theia's reference library filenamify is an old version, there is a problem with code call timing when using it, can you update filenamify to the latest version and modify the related code?

vince-fugnitto commented 2 years ago

@gomlangle thank you for the issue :+1:

The filenamify warning you see should not fail the build. You'll see the warning in other builds of the framework which are successful (example).

I verified with theia-python:next and it built correctly:

$ docker build --no-cache . -t theiaide/theia-python:next

...

Successfully built 3563a6c86b01
Successfully tagged theiaide/theia-python:next

Looking online the SIGKILL might be due to a memory issue on your system. Perhaps a prune might help.

gomlangle commented 2 years ago

@vince-fugnitto Thanks for your help, this helped me!! I tried to configure theia manually and found that there were many times of ‘’request timeout’’ when downloading the plug-in, which caused "yarn" to exit unexpectedly.