diff --git a/scripts/error-codes/extract-errors.js b/scripts/error-codes/extract-errors.js index d82b4e68db15f..58823cbe16873 100644 --- a/scripts/error-codes/extract-errors.js +++ b/scripts/error-codes/extract-errors.js @@ -6,7 +6,7 @@ */ 'use strict'; -const babylon = require('babylon'); +const parser = require('@babel/parser'); const fs = require('fs'); const path = require('path'); const traverse = require('@babel/traverse').default; @@ -65,7 +65,7 @@ module.exports = function(opts) { existingErrorMap = invertObject(existingErrorMap); function transform(source) { - const ast = babylon.parse(source, babylonOptions); + const ast = parser.parse(source, babylonOptions); traverse(ast, { CallExpression: {