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

[BUG] frontend build fails #5659

Closed
Tracked by #5709
nicokant opened this issue Mar 31, 2023 · 6 comments
Closed
Tracked by #5709

[BUG] frontend build fails #5659

nicokant opened this issue Mar 31, 2023 · 6 comments

Comments

@nicokant
Copy link
Contributor

nicokant commented Mar 31, 2023

Describe the bug
frontend build fails, this happens also using docker-compose build

To Reproduce
Steps to reproduce the behavior:

  1. clone the repository
  2. cd frontend && npm install
  3. npm run build

Build fails with error:

> TaskingManager-frontend@0.1.0 build /home/nicokant/Work/gisdevio/tasking-manager/frontend
> npm run preparation && npm run update-static && react-scripts build


> TaskingManager-frontend@0.1.0 preparation /home/nicokant/Work/gisdevio/tasking-manager/frontend
> bash -c "if (test -a ../tasking-manager.env); then grep -hs ^ ../tasking-manager.env .env.expand > .env; else cp .env.expand .env; fi"


> TaskingManager-frontend@0.1.0 update-static /home/nicokant/Work/gisdevio/tasking-manager/frontend
> bash -c "mkdir -p public/static/id; mkdir -p public/static/rapid; cp -R node_modules/@hotosm/id/dist/* public/static/id; if ! (test -a node_modules/RapiD/dist/RapiD.css) then mv node_modules/RapiD/dist/iD.css node_modules/RapiD/dist/RapiD.css; fi; cp -R node_modules/RapiD/dist/* public/static/rapid;"

Creating an optimized production build...
Failed to compile.

./src/components/horizontalScroll/styles.scss
globalThis is not defined

Expected behavior
Build successfully

Desktop (please complete the following information):

  • OS: Linux Fedora
  • TM Version 4.5.2
  • Node 10.24.1
@Aadesh-Baral
Copy link
Contributor

@nicokant Can you try it on node 16?

@nicokant
Copy link
Contributor Author

nicokant commented Apr 3, 2023

@Aadesh-Baral I used Node 10 because the frontend dockerfile uses it:
https://github.com/hotosm/tasking-manager/blob/4.5.2/scripts/docker/Dockerfile.frontend#L1

It seems that with Node 16 it works fine but with Node 10 it can't build the image. Is there a CI setup for the project? I think it could help catching these problems :)

@nicokant
Copy link
Contributor Author

@Aadesh-Baral are docker scripts still maintained?

@Aadesh-Baral
Copy link
Contributor

@nicokant They are not maintained currently. However, it's on our plan to use and maintain docker scripts, and this will probably start soon.

@nicokant
Copy link
Contributor Author

@Aadesh-Baral I created a PR with node js v16 support, let me know if there's something else I could do to fix this issue.

@ramyaragupathy
Copy link
Member

ramyaragupathy commented May 1, 2024

With #5721 - node version moved to 18

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

No branches or pull requests

5 participants