In node version v12.10.0 this line import * as fs from 'fs'
throws
Thrown:
import * as fs from 'fs'
^
SyntaxError: Unexpected token *
CodePudding user response:
import
support have been added n version 13.2
12.10
is old and I recommend using 16.17.1
as it has long-term support