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
Description
After deploying the 2024 backend on staging environment,
<host>/admin/
): works fine<host>/
): see the error message/usr/local/app/node_modules/.bin/node-sass: not found
Steps to Reproduce
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 lineexpected
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):