-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
shakapacker fails to run webpack if modules dir is absolute path #550
Comments
@cryptomilk PR's welcome! |
Thanks Andreas for taking the time to report a bug. The referenced code in https://github.com/shakacode/shakapacker/blob/main/lib/shakapacker/webpack_runner.rb#L47 doesn't contruct the path, but you can find it |
It is unclear where this path is constructed. Looking at the package_json code, and I'm not a ruby developer, kt looks like the native_command should be |
Looks like the culprit is yarn classic:
|
Well, using pnpm also isn't a solution: pnpm/pnpm#9113 I guess you have check if the path you want to exec exists, if not try env |
I've opened shakacode/package_json#21 |
@cryptomilk as I said on shakacode/package_json#21 (comment) while I'm not sure if this is actually something In addition to exploring the solution you proposed (which I think would effectively be looking to restore the Also couple of side questions:
|
Because the git source directory is mounted to the container for development, but I guess the developers didn't want to pollute the source do with node modules. |
We use
/usr/src/node_modules
as the node path and yarn module path to install modules in a container. However since shakapacker removedSHAKAPACKER_NODE_MODULES_BIN_PATH
this doesn't work anymore.It looks like the current working directory and
NODE_PATH
are concatenated. It should actually check if NODE_PATH is an absolute path. Maybe this is happening in package_json now.Expected behavior:
/usr/src/node_modules/.bin/webpack
should be calledActual behavior:
/usr/src/app/usr/src/node_modules/.bin/webpack
is calledSmall, reproducible repo:
https://gitlab.com/routenbuch/routenbuch/-/merge_requests/41
podman-compose -p routenbuch up
Setup environment:
The text was updated successfully, but these errors were encountered: