Closed alexng353 closed 1 year ago
Hello,
Thanks for making a test repo, that really help with debugging this issue. It looks like the problem is with the dynamic import for got
because openGraphScraper is using CommonJS. I believe this issue is related to this and this.
Have you try using a different test runner?
No, I have not tried using a different test runner. I've just cloned my test repo to codespaces, I'm gonna heck around until I find out. Thanks so much for the help @jshemas.
P.S. This is my first time making issues, is there anything that you'd like to give me feedback on? Thanks so much in advance.
I don't have any feedback for you but I did really appreciate the working example of the problem!
See the recreation repository here
Below is the pasted readme which should contain all the necessary information.
ogs-bug-example
Description
A repostiory to demonstrate a bug in the open-graph-scraper package above the version 4.11.1.
Steps to reproduce
yarn
yarn test
Expected behavior
The program should not segfault.
Actual behavior
The program segfaults.
Notes
If you start the server with
yarn start
and just go to http://localhost:3555, the code doesn't segfault. It only segfaults when you run the test.I'm not sure if this means that supertest or jest is at fault, but I'm submitting an issue anyways.
Environment
Additional info
Installing open-graph-scraper 4.11.1 and running the test will not segfault. See branch 4.11.1