ansible / ansible-ui

The UIs for Ansible Projects such as AWX, EDA, and HUB.
https://ansible.github.io/ansible-ui/
Apache License 2.0
75 stars 65 forks source link

TypeError: A string was expected - sharp.pipeline #3071

Open MarOwNFR opened 2 months ago

MarOwNFR commented 2 months ago

Hello everyone,

I'm on the Ubuntu Sevrer 24.04 system and I'm trying to install ansible-ui for ansible-awx but I encounter an error when using the make command “make clean/ui ui”.

The error occurs in the npm section of the ansible-ui repo, the error is as follows:

“=== Building ui ===

> @ansible/ansible-ui@2.4.313 build:awx
> rm -rf build/awx && UI_MODE=AWX webpack --mode production --config ./webpack/webpack.awx.cjs --output-path build/awx

/root/awx/awx/ui/src/node_modules/sharp/lib/output.js:1534
        sharp.pipeline(this.options, (err, data, info) => {
              ^

TypeError : A string was expected
    at /root/awx/awx/ui/src/node_modules/sharp/lib/output.js:1534:15
    at new Promise (<anonymous>)
    at Sharp._pipeline (/root/awx/awx/ui/src/node_modules/sharp/lib/output.js:1533:14)
    at Sharp.toBuffer (/root/awx/awx/ui/src/node_modules/sharp/lib/output.js:162:15)
    at resize (/root/awx/awx/ui/src/node_modules/favicons/dist/index.cjs:243:8)
    at createPlane (/root/awx/awx/ui/src/node_modules/favicons/dist/index.cjs:276:23)
    at createFavicon (/root/awx/awx/ui/src/node_modules/favicons/dist/index.cjs:323:28)
    at /root/awx/awx/ui/src/node_modules/favicons/dist/index.cjs:409:25
    at Array.map (<anonymous>)
    at FaviconsPlatform.createImages (/root/awx/awx/ui/src/node_modules/favicons/dist/index.cjs:408:24)

Node.js v18.19.1
make[1] : *** [awx/ui/Makefile:38 : awx/ui/src/build/awx] Error 1
make[1]: Exit '/root/awx' directory
make : *** [awx/ui/Makefile:25 : awx/ui/build] Error 2 ”

I've looked for solutions to this problem, I've fixed others for missing dependencies, but the lack of detail on the error doesn't allow me to correct it.

It's a new installation with no liabilities.

Thanks in advance.

MarOwNFR commented 2 months ago

Hello,

I already have gcc

gcc --version

gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see source for copying conditions.  There is NO
warranty, not even of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I cannot open this unverified mediafire link.

Thanks

sabnak commented 1 month ago

I had the same problem. Updating to the latest node and npm versions solved it. npm >= 10.8.2, node >= 20.18.0