Skip to content

13.1.1 -> 13.2.0: Error: Cannot find module from within barrel files #1377

@SantoJambit

Description

@SantoJambit

I'm getting this error when I upgrade from 13.1.1 to 13.2.0 (newer versions don't fix it):

Error: Cannot find module './paramType' from '/.../packages/library/src/support'
    at /.../node_modules/browser-resolve/node_modules/resolve/lib/async.js:55:21
    at load (/.../node_modules/browser-resolve/node_modules/resolve/lib/async.js:69:43)
    at onex (/.../node_modules/browser-resolve/node_modules/resolve/lib/async.js:92:31)
    at /.../node_modules/browser-resolve/node_modules/resolve/lib/async.js:22:47

src/support/index.ts is a barrel file and since it's not listed in the path as index.ts, I'm guessing the path resolution is broken for barrel files:

export * from './paramType';

I've tried this with 13.2.5, where it fails. It works with 13.1.1 if I use my old yarn.lock file, but if I install 13.2.0 and then go back to 13.1.1 it fails, so I'm assuming this is some dependency issue. browser-resolve is still the same version though, so maybe it has to do with module-deps-sortable?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions