drainpipe
drainpipe copied to clipboard
ddev task javascript:compile fails
When running ddev task dev
, the javascript compile step fails with an exit status of 1. This is only happening on my machine (an Intel Mac running MacOS 13.4.1 (c)). I have tried the following troubleshooting steps:
1.) Delete and re-clone the repository
2.) Uninstall and reinstall ddev and Docker
3.) Reboot computer (it never hurts)
4.) Run command manually inside container. This fails silently with an exit status of 1
Command output
ddev task -v javascript:compile
task: "javascript:compile" started
task: [javascript:compile] if [ "web/themes/custom/bookworm/script.js:web/themes/custom/bookworm/script.min.js
web/themes/custom/ghostwriter/script.js:web/themes/custom/ghostwriter/script.min.js
web/modules/custom/indiecommerce_design/script.js:web/modules/custom/indiecommerce_design/script.min.js
" == "" ]; then echo "🪠 Nothing provided for esbuild to compile"; exit 0; fi
ARGS="--minify"
if [ "" != "" ]; then
ARGS=""
fi
FILES="web/themes/custom/bookworm/script.js:web/themes/custom/bookworm/script.min.js web/themes/custom/ghostwriter/script.js:web/themes/custom/ghostwriter/script.min.js web/modules/custom/indiecommerce_design/script.js:web/modules/custom/indiecommerce_design/script.min.js"
COMMAND="./node_modules/.bin/drainpipe-javascript"
if [ -f "yarn.lock" ]; then
COMMAND="yarn drainpipe-javascript"
fi
$COMMAND drainpipe-javascript --files="$FILES" $ARGS
task: Failed to run task "javascript:compile": exit status 1
@justafish do we have a test for this? I see #303 which has the task in a fixture, but I'm not seeing anything that actually calls this.
@justafish @deviantintegral do you know if this is repeatable in newer versions? @ABAJosh it'd be good if you add extra details on the steps you took for setting up the task that is failing. Additionally, would you mind sharing the JS libraries or dependencies your project had at that time?
this task is called in all the workflows in this test https://github.com/Lullabot/drainpipe/blob/main/.github/workflows/TestMetapackages.yml
I tested the javascript:compile
task command and I was not able to replicate the reported issue. I installed Drainpipe on Drupal 10 instances on Ubuntu and macOS systems.
Do you think there may be dependencies or modules on your system that conflict with Drainpipe?
It seems you need to upgrade your drainpipe version to v3.8.0 or later. Another thing you may have missed is setting the DRAINPIPE_JAVASCRIPT
var on your Taskfile. Refer to the Setup instructions here