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

Module not found: Error: Can't resolve '../../components/SearchBox/SearchBox' #3611

Closed
daanvosdewael opened this issue Mar 16, 2019 · 4 comments

Comments

@daanvosdewael
Copy link

daanvosdewael commented Mar 16, 2019

Describe the bug 🐛
In PR #3489 the SearchBox component was renamed from lowercase 'b' to uppercase:

-src/components/SearchBox/Searchbox.js
+src/components/SearchBox/SearchBox.js

This is reflected in the repo but not when the package is pulled down from NPM. This results on Linux in a Module not found error. Strangely on macOS the file is found and the file mismatch doesn't trigger an error.

To Reproduce 🔍

  1. Install instantsearch.js package with either npm or yarn
  2. Check that the SearchBox component file in node_modules is with lowercase 'b'
@francoischalifour
Copy link
Member

This is indeed very annoying.

None of the CJS or ES export names were updated on the npm registry.

I'll have a deeper look tomorrow.

@Haroenv
Copy link
Contributor

Haroenv commented Mar 18, 2019

This was likely because the name change didn't change in git? I know changing a name where only the casing changes on Mac is easy to have errors

@francoischalifour
Copy link
Member

francoischalifour commented Mar 18, 2019

The file is correctly named on GitHub so I would expect npm to behave the same way.

When cloning the repo or running yarn build, the files are named correctly.

@francoischalifour
Copy link
Member

You can upgrade to version 3.2.1 to fix the issue (see ES and CJS SearchBox exports).

Thank you for reporting!

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

3 participants