Updating Consola from v2 to v3 resulting into a syntax error
YuryShkoda opened this issue · 2 comments
YuryShkoda commented
Environment
Node.js: v18.14.2
npm: v9.5.0
typescript: v5.1.6
Reproduction
- sasjs/utils#241
- package
@sasjs/utils
usingnpm run package:lib
script - clone
@sasjs/cli
- install packaged
@sasjs/utils
to@sasjs/cli
by runningnpm i ../utils/build/sasjs-utils-5.0.0.tgz && npm start
- run any
sasjs
comand (egsasjs help
)
Describe the bug
Bumping consola
from v2
(we were using 2.15.0
) to v3
(eg 3.2.3
or any 3.*
) resulting into a syntax error.
Additional context
The main goal of bumping the version of consola
, which was working great so far, is to be able to disable colors in logged messages. Related issue sasjs/cli#1367.
Thank you very much for your help in advance!
Logs
No response
pi0 commented
Hi. Thanks for raising the issue. The syntax error you are getting with ??
is Nullish coalescing operator. It is supported in Node.js 18 but there is possibility that you are using an older Webpack, jest runner or babel version that is not supporting this syntax.
YuryShkoda commented