Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build for UI fails #6709

Closed
wido opened this issue Sep 6, 2022 · 6 comments · Fixed by #6712
Closed

Docker build for UI fails #6709

wido opened this issue Sep 6, 2022 · 6 comments · Fixed by #6712

Comments

@wido
Copy link
Contributor

wido commented Sep 6, 2022

ISSUE TYPE
  • Bug Report
COMPONENT NAME
UI
Docker
CLOUDSTACK VERSION
main
4.17
OS / ENVIRONMENT

Building the UI Docker container

SUMMARY

Trying to build the Docker container for the UI fails with NodeJS builds failing.

STEPS TO REPRODUCE

Try to build the UI Docker container

cd ui
bash docker.sh
ACTUAL RESULTS
npm ERR! gyp verb command build []
npm ERR! gyp verb build type Release
npm ERR! gyp verb architecture x64
npm ERR! gyp verb node dev dir /root/.node-gyp/16.15.1
npm ERR! gyp verb `which` succeeded for `make` /usr/bin/make
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from /root/.node-gyp/16.15.1/include/node/v8.h:30:0,
npm ERR!                  from /root/.node-gyp/16.15.1/include/node/node.h:63,
npm ERR!                  from ../../nan/nan.h:56,
npm ERR!                  from ../src/binding.cpp:1:
npm ERR! /root/.node-gyp/16.15.1/include/node/v8-internal.h: In function 'void v8::internal::PerformCastCheck(T*)':
npm ERR! /root/.node-gyp/16.15.1/include/node/v8-internal.h:492:33: error: 'remove_cv_t' is not a member of 'std'
npm ERR!              !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR!                                  ^~~
npm ERR! /root/.node-gyp/16.15.1/include/node/v8-internal.h:492:33: error: 'remove_cv_t' is not a member of 'std'
npm ERR! /root/.node-gyp/16.15.1/include/node/v8-internal.h:492:50: error: template argument 2 is invalid
npm ERR!              !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR!                                                   ^
npm ERR! /root/.node-gyp/16.15.1/include/node/v8-internal.h:492:61: error: '::Perform' has not been declared
npm ERR!              !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR!                                                              ^~
npm ERR! make: *** [Release/obj.target/binding/src/binding.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/build/node_modules/node-sass/node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Linux 5.4.0-125-generic
npm ERR! gyp ERR! command "/usr/local/bin/node" "/build/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /build/node_modules/node-sass
npm ERR! gyp ERR! node -v v16.15.1
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok 
npm ERR! Build failed with error code: 1
@rohityadavcloud
Copy link
Member

@wido we don't support node v16 yet, can you try to use v14 (we however need to fix our build to allow use of node v16 or v18 https://nodejs.org/en/about/releases/ cc @utchoang)

@wido
Copy link
Contributor Author

wido commented Sep 6, 2022

@wido we don't support node v16 yet, can you try to use v14 (we however need to fix our build to allow use of node v16 or v18 https://nodejs.org/en/about/releases/ cc @utchoang)

I did not touch the Dockerfile. This is how it is in the Git repo.

@wido
Copy link
Contributor Author

wido commented Sep 6, 2022

@wido we don't support node v16 yet, can you try to use v14 (we however need to fix our build to allow use of node v16 or v18 https://nodejs.org/en/about/releases/ cc @utchoang)

I did not touch the Dockerfile. This is how it is in the Git repo.

I can confirm that changing the Dockerfile to build with node:14 works

@weizhouapache
Copy link
Member

@wido we don't support node v16 yet, can you try to use v14 (we however need to fix our build to allow use of node v16 or v18 https://nodejs.org/en/about/releases/ cc @utchoang)

I did not touch the Dockerfile. This is how it is in the Git repo.

I can confirm that changing the Dockerfile to build with node:14 works

Great
@wido can you create a pull request ?

@wido
Copy link
Contributor Author

wido commented Sep 7, 2022

@wido we don't support node v16 yet, can you try to use v14 (we however need to fix our build to allow use of node v16 or v18 https://nodejs.org/en/about/releases/ cc @utchoang)

I did not touch the Dockerfile. This is how it is in the Git repo.

I can confirm that changing the Dockerfile to build with node:14 works

Great @wido can you create a pull request ?

As you can see that's done. As I expect this PR to merge I'm closing this issue.

@wido wido closed this as completed Sep 7, 2022
@utchoang
Copy link

utchoang commented Sep 8, 2022

@rohityadavcloud I tried to building Cloudstack on node versions 16 and 18 but release error from 2 dependencies node-sass and sass-loader. It is necessary to upgrade node-sass and sass-loader for each node version respectively. Particularly with node 18 version, because node-sass is not yet supported (https://www.npmjs.com/package/node-sass), it cannot build successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants