[Errno 2] No such file or directory: webpack when trying to build assets

Hi, I’ve been following the local development instructions and I’ve been mostly successful. I was able to fix the pavelib issues by installing the dependencies and running the command with:

tutor dev run lms npm install
tutor dev run lms openedx-assets build --env=dev

However when I run the second command now trying to build the assets, I get the following issue:

I’ve checked the node_modules folder inside the container, and webpack is there and I’ve also checked the documentation and other issues, but there’s no mention of this issue. I’m currently running tutor on MacOS Catalina v10.15.7. Thank you for any tips, helps or suggestions in resolving this issue!

Hi @c3ho! You did not mention which version of Tutor you are running? (tutor --version)

Also, what is the output of the following comands:

tutor dev run lms bash
echo $PATH 

webpack should be in the path if npm install terminated successfully.

Hi @regis, thanks for the reply! tutor, version 10.3.0.

I don’t think I’ve seen any issues when I did a npm install with the container’s shell:

echo $PATH within shell produces the following:

Ok let’s go hunt for webpack:

tutor dev run lms bash
which webpack
ls -lh ./node_module/.bin/webpack
ls -lh /openedx/edx-platform/node_module/.bin/webpack

I got this

I checked out the .bin folder within node_modules:

I decided to cd into node_modules and this is what I see

cd into webpack produces the following:

On a working Open edX platform you should have:

root@be81b8d834e9:/openedx/edx-platform# which webpack

I suggest you delete and re-create the node_modules:

tutor dev run lms bash
rm -rf node_modules
npm install

I assume you are mounting a local edx-platform folder in your containers, right?

Sure thing, I’ll try blowing away the whole node_modules folder and doing a npm install, and yes mounting a local edx platform folder for container

@regis Thanks it worked!