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

[Deployment] /usr/local/app/node_modules/.bin/node-sass: not found #1156

Closed
mattwang44 opened this issue Jan 27, 2024 · 0 comments · Fixed by #1157
Closed

[Deployment] /usr/local/app/node_modules/.bin/node-sass: not found #1156

mattwang44 opened this issue Jan 27, 2024 · 0 comments · Fixed by #1157
Assignees
Labels
triage needed The bug report may be just filed. Please triage it.

Comments

@mattwang44
Copy link
Member

Description

After deploying the 2024 backend on staging environment,

  • Access the admin site (<host>/admin/): works fine
  • Access proposal system (<host>/): see the error message /usr/local/app/node_modules/.bin/node-sass: not found

Steps to Reproduce

  • rebuild the container
  • access the proposal system page

Expected Behavior

It should display the page (but it does not).

Actual Behavior

500 response.
After turning on the debug mode, it shows /usr/local/app/node_modules/.bin/node-sass: not found.

Additional context

It should be the side effect of #1151.

Inside the src/pycontw2016/settings/base.py, the line

COMPRESS_NODE_SASS_BIN = node_bin('node-sass')

expected node-sass executable at the patch /usr/local/app/node_modules/.bin. However, after #1151, the path to the node_modules was moved to /usr/local/lib/node_modules/, which causes the exception. But not sure why we did not encounter this after #1511 (maybe we haven't rebuilt for too long?)

For the current staging environment, I fixed it up with a workaround (but it'll still break after rebuild):

> docker exec -it pycontw-2024 bash -c "cp -r /usr/local/lib/node_modules/ /usr/local/app; ls /usr/local/app"
> docker-compose restart web
@mattwang44 mattwang44 added the triage needed The bug report may be just filed. Please triage it. label Jan 27, 2024
@iknowright iknowright self-assigned this Jan 27, 2024
@mattwang44 mattwang44 linked a pull request Jan 27, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage needed The bug report may be just filed. Please triage it.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants