Help Request: ModuleNotFoundError: No module named ‘_sass’ when building Open edX with Tutor
I’ve been struggling to set up an Open edX instance using Tutor and consistently encounter the following error during image building:
ModuleNotFoundError: No module named ‘_sass’
Dockerfile:212
210 | # will be processed. This makes the docker image lighter and faster to build.
211 | RUN npm run postinstall # Postinstall artifacts are stuck in nodejs-requirements layer. Create them here too.
212 | >>> RUN npm run compile-sass – --skip-themes
213 | RUN npm run webpack
214 |
---|
ERROR: failed to solve: process “/bin/sh -c npm run compile-sass – --skip-themes” did not complete successfully: exit code: 1 |
What I’ve tried so far:
- Used both Tutor 19.0.0 and 19.0.2 versions
- Switched from Python 3.10 to Python 3.11
- Deleted and recreated the virtual environment
- Completely wiped and re-cloned the edx-platform repository
- Cleaned Docker cache and removed all containers before rebuilding
- Ran
tutor config save
to create fresh configuration - Ran
tutor build --no-cache
to avoid caching issues - Installed libsass via pip (
pip install libsass
) - Tried installing sass globally (
npm install -g sass
)
I’ve seen references to node-sass compatibility issues in Stack Overflow and the Open edX forums, with suggestions to update the node-sass version in package.json, but nothing has worked so far.
When running tutor dev launch
or any tutor build
command, I consistently hit this error. My goal is to eventually mount my local edx-platform directory to Tutor for customization, but I can’t even get past the initial build.
Has anyone encountered this specific issue with Tutor 19.x and found a working solution? Any guidance would be greatly appreciated!
Additional environment details:
Thank you in advance for any help!
Feel free to fill in the additional environment details at the bottom with your specific system information before posting.