meow does something strange with GL
mifi opened this issue · 7 comments
I create a new directory then yarn add gl meow
const GL = require('gl');
const meow = require('meow');
// meow('foo');
const gl = GL(800, 600);
console.log(gl != null);
This prints true
- all ok.
However when I uncomment meow('foo')
, I get false
. So for some reason GL
returns null now. Will look more into it, but maybe you have an idea. Is meow doing any global changes to the node environment?
The only thing I can think of is
Lines 13 to 15 in 2954ed2
I tried to comment out the "delete" line, didn't help
Hello, I happen to watch this repository and this issue surprised me. I tried to reproduce it but could not. I got true
as output in both cases. The only difference is that I used npm instead of yarn.
EDIT: used yarn, still getting true
in both cases.
I did some binary search code elimination and I found that what's causing it is this line:
Line 80 in 2954ed2
@papb which OS are you on?
So basically the way to reproduce this is:
const GL = require('gl');
process.title = 'foo'
const gl = GL(320, 240);
console.log(gl != null)
Returns false
If I comment out process.title = 'foo'
, returns true
Now I found this issue: stackgl/headless-gl#180
As suggested there I upgraded to node v12.16.2 and now it works. I was running v12.11.1 before.
I am on windows, node v12.14.1