You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know there's #2 already with the similar error message, but that issue was also iterated on many times, and the cause is probably different.
For the record, I got to this state by:
Error: Cannot read properties of null (reading 'program')
Stack:
at BarrelFile.createSpecifiersMapping (../../node_modules/babel-plugin-transform-barrels/src/barrel.js:242:19)
at BarrelFile.handleExportAllDeclaration (../../node_modules/babel-plugin-transform-barrels/src/barrel.js:214:25)
at ../../node_modules/babel-plugin-transform-barrels/src/barrel.js:259:18
at Array.every (<anonymous>)
at BarrelFile.createSpecifiersMapping (../../node_modules/babel-plugin-transform-barrels/src/barrel.js:242:32)
at BarrelFile.handleExportAllDeclaration (../../node_modules/babel-plugin-transform-barrels/src/barrel.js:214:25)
at ../../node_modules/babel-plugin-transform-barrels/src/barrel.js:259:18
at Array.every (<anonymous>)
at BarrelFile.createSpecifiersMapping (../../node_modules/babel-plugin-transform-barrels/src/barrel.js:242:32)
at BarrelFilesPackage.getBarrelFile (../../node_modules/babel-plugin-transform-barrels/src/barrel.js:325:24)
at Function.getBarrelFile (../../node_modules/babel-plugin-transform-barrels/src/barrel.js:399:43)
at importDeclarationVisitor (../../node_modules/babel-plugin-transform-barrels/src/main.js:22:46)
at PluginPass.call (../../node_modules/babel-plugin-transform-barrels/src/main.js:93:7)
Investigation:
the last processed barrel file is libs/mobile/test-utils/src/index.ts, with content:
I have released a new version of the plugin (v1.0.23) that should resolve your issue.
Please update your version and let me know if it resolves your issue.
I know there's #2 already with the similar error message, but that issue was also iterated on many times, and the cause is probably different.
For the record, I got to this state by:
absModuleDirs
#9 and jestMock: fix safe access ofbody[0]
#10Error:
Cannot read properties of null (reading 'program')
Stack:
Investigation:
libs/mobile/test-utils/src/index.ts
, with content:BarrelFilesPackage.getBarrelFile('/Users/richard/repos/xxx/libs/mobile/test-utils/src/index.ts')
barrelFile.createSpecifiersMapping()
libs/mobile/test-utils/src/testUtils.tsx
, there's this code:exportedAllFile.createSpecifiersMapping(true)
on the first importabsoluteExportedPath
is''
, barrel is created for the empty pathexportedAllFile.createSpecifiersMapping(true)
const barrelAST = AST.filenameToAST('')
barrelAST
is nullThe text was updated successfully, but these errors were encountered: