File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ const {
33
33
}
34
34
} = require ( 'internal/errors' ) ;
35
35
const { openSync, closeSync, readSync } = require ( 'fs' ) ;
36
- const { parseExpressionAt } = require ( 'internal/deps/acorn/dist/acorn' ) ;
37
36
const { inspect } = require ( 'util' ) ;
38
37
const { EOL } = require ( 'os' ) ;
39
38
const { NativeModule } = require ( 'internal/bootstrap/loaders' ) ;
@@ -173,6 +172,8 @@ function getErrMessage(call) {
173
172
fd = openSync ( filename , 'r' , 0o666 ) ;
174
173
const buffers = getBuffer ( fd , line ) ;
175
174
const code = Buffer . concat ( buffers ) . toString ( 'utf8' ) ;
175
+ // Lazy load acorn.
176
+ const { parseExpressionAt } = require ( 'internal/deps/acorn/dist/acorn' ) ;
176
177
const nodes = parseExpressionAt ( code , column ) ;
177
178
// Node type should be "CallExpression" and some times
178
179
// "SequenceExpression".
You can’t perform that action at this time.
0 commit comments