sindresorhus / ora

Elegant terminal spinner
MIT License
9.08k stars 269 forks source link

Something should say that node must be higher than v14 #196

Closed JasonHenriksen closed 2 years ago

JasonHenriksen commented 2 years ago

nvm use 14
Now using node v14.17.6 (npm v6.14.15) npm run test

FAIL src/main.test.ts ● Test suite failed to run Cannot find module 'node:process'

nvm use 17
Now using node v17.2.0 (npm v8.1.4)

npm run test PASS src/main.test.ts


I wasn't familiar with the new "node:process" syntax so it wasn't immediately clear to me that I had a node version problem.

sindresorhus commented 2 years ago

node: is supported on the Node.js version targets defined in package.json: https://github.com/sindresorhus/ora/blob/c5026b7b411765636ae08a8f4a15789617ba695e/package.json#L15-L17

jason-henriksen commented 2 years ago

Right you are. How weird. Because it turns out that it works when I run it from the CLI, but my jest test fails. Sorry that I trusted the test instead of also verifying with the CLI. I have no idea why they behave differently.

image