-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Always encounter "Segmentation Fault" when running on Docker node >= 18 and ava >=4 #3236
Description
Please provide details about:
- What you're trying to do
I am just trying to run a ultra basic test on docker with ava. I am using a mac with an Intel chip.
My test file is
const test = require('ava');
test('foo', t => {
t.pass()
})My docker file
FROM node:18.17.1
WORKDIR /app
ENV CI=true
COPY package*.json ./
RUN npm install
COPY . ./
# Just to reproduce the issue
RUN npm run ava
CMD npm run start
And my package.json
{
"name": "temp",
"version": "1.0.0",
"main": "test.js",
"devDependencies": {
"ava": "5.3.1"
},
"scripts": {
"ava": "ava ./test.js",
"init": "docker build --rm -f ./Dockerfile -t temp:latest .",
}
}
- What happened
Every time I run npm run init, I always have a Segmentation fault that happen before running a single line of code.
This is only when I use a node version superior to 18 and an ava version >= 4. If I use the node 16 version or the 3.15.0 ava version everything works fine (node 16 with ava 5.3.1 or node 18 with ava 3.15.0 : OK).
I know this usually more of a node issue but I only have this issue with the ava command.
I tried with jest for instance and the test pass successfully. I have updated all my environment to latest versions (docker, OS...). I also tried reinstalling my docker env and clearing cache.
I see that starting with the v4 the package introduces "Worker threads" so it might be link with my issue but even with --no-worker-threads it still doesn’t work.
It must be something with my personal config but I can't find the source of the issue. The last thing I could do would be to reset my computer but I would rather not.
Does someone have any tips on what to do ?
Thanks
- What you expected to happen
A test running without a "Segmentation fault"