Logical OR assignment operator (" ||= ") not supported? #10634
-
i am using the husky libary and it uses the ||= operator. When starting the bun server, I see this error: |
Beta Was this translation helpful? Give feedback.
Answered by
Jarred-Sumner
Apr 30, 2024
Replies: 2 comments 1 reply
-
Bun supports This script is running with an old version of Node.js. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Jarred-Sumner
-
Husky itself runs node I think
…On Tue, Apr 30, 2024 at 2:11 AM Benajmin Franz ***@***.***> wrote:
I dont think it is running by node. In the husky source code I cannot see
any node / npm calls either.
Thats the start.sh
#!/bin/bash
# Assign the job name from either the RUN_JOB environment variable or the first command line argument
jobName=${RUN_JOB:-$1}
if [ -n "$jobName" ]; then
# If jobName is not empty, get the job ID from either the JOB_ID environment variable or the second command line argument
jobid=${JOB_ID:-$2}
echo "Starting job: $jobName with jobid: $jobid"
# Run the job with the specified jobid
bun run src/jobs/"$jobName".ts "$jobid"
else
# If jobName is empty, start the server
bun run src/startServer.ts
fi
—
Reply to this email directly, view it on GitHub
<#10634 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFNGS2XRDOQ2R56QH6M7QDY75N3NAVCNFSM6AAAAABG6BAQYSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TENZSHAZDK>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bun supports
||=
and the other modern ECMAScript features you'd expect.This script is running with an old version of Node.js.
./start.sh
is either runningnode
or a script it starts is runningnode
. Either update thestart.sh
script to runbun
, or prefix the invocation with--bun
, likebun --bun start