Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
SantoJambit opened this issue May 3, 2021 · 2 comments
Closed
Assignees

Comments

@SantoJambit
Copy link

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?

@anthony-redFox anthony-redFox self-assigned this May 3, 2021
@anthony-redFox
Copy link
Member

@SantoJambit Since 13.2.0 version code analyze on imports and exports but it is still has issues with extensions. I guess that your file paramType has ts extension. Is it right?

@SantoJambit
Copy link
Author

Yes, that is correct.

anthony-redFox added a commit to anthony-redFox/documentation that referenced this issue May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants