-
-
Notifications
You must be signed in to change notification settings - Fork 543
Closed
Labels
Description
After upgrading to ts-node from 0.5.4 to 0.7.1 I started seeing this error... It took me a while to find the root cause because I was looking for numbers... and searching online didn't help. I'm filing this here for future wanderers and in hope that it might be addressed somehow.
SyntaxError: Octal literals are not allowed in strict mode.
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.loader (.../node_modules/ts-node/src/ts-node.ts:224:14)
The issue was caused by ANSI escape code which is a string, not a number (octal literal) that starts with 0, like 0644. In my case the string was '\033[0m'. The solution was to replace it with '\u001b[0m'
craigmichaelmartin, sunnypatel, TheOnlyArtz and aleclarsonalexgorbatchev, valduris and BeauBouchard