qrcode-terminal icon indicating copy to clipboard operation
qrcode-terminal copied to clipboard

RollupError: Octal literal in strict mode

Open KevinKWZheng opened this issue 2 years ago • 1 comments

I am trying to use this module in my ts project, but Rollup keeps giving me errors

[!] (plugin rpt2) RollupError: Octal literal in strict mode (3:13) node_modules/qrcode-terminal/lib/main.js (3:13) 1: var QRCode = require('./../vendor/QRCode'), 2: QRErrorCorrectLevel = require('./../vendor/QRCode/QRErrorCorrectLevel'), 3: black = "\033[40m \033[0m", ^ 4: white = "\033[47m \033[0m", 5: toCell = function (isBlack) {

It seems that Rollup has mistaken '\033' as an octal number. I've tried setting skipLibCheck in tsconfig, and excluding node_modules, but it is still giving this error.

KevinKWZheng avatar Jan 16 '23 10:01 KevinKWZheng

This seems to be related to https://github.com/gtanner/qrcode-terminal/pull/29

guivictorr avatar Jan 20 '23 06:01 guivictorr