Why are utf16 / surrogate pairs emojis not displayed correctly in console.log() when run through yarn on Windows? (npm and node directly are fine)

203 views Asked by At

Somehow running console.log('Thunderbirds are go! ') via yarn / node does not display the emoji but outputs � instead.

I'm on Windows Terminal / Git Bash which in itself has no problems displaying utf-16 surrogate pairs. Running a script through node directly (node test.js) as well as through npm (npm run start which is defined as node test.js) both output the emoji correctly. However running it through yarn results in �:

code screenshot

Why won't it output the emoji when I run it through yarn? Is there a way to fix it?

0

There are 0 answers