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

Can't resolve 'file-selector' #1022

Closed
nnurmano opened this issue Oct 23, 2020 · 26 comments
Closed

Can't resolve 'file-selector' #1022

nnurmano opened this issue Oct 23, 2020 · 26 comments
Labels

Comments

@nnurmano
Copy link

After installing react-dropzone
npm install --save react-dropzone
I have the following error when trying to start the application.
./node_modules/react-dropzone/dist/es/index.js
Module not found: Can't resolve 'file-selector' in 'C:\src\app\node_modules\react-dropzone\dist\es'

The version is "react-dropzone": "^11.2.0",

@nixjs
Copy link

nixjs commented Oct 23, 2020

The same issuse

@jhetuts
Copy link

jhetuts commented Oct 23, 2020

Same here
Output:
image
Version:
image

Added file-selector explicitly on package.json still nothing.

@rolandjitsu
Copy link
Collaborator

That's my bad, I was trying to explicitly include the LICENSE file in the file-sector release and did not include the dist dir. Should be fixed now (see v0.2.2).

@ex-git
Copy link

ex-git commented Oct 23, 2020

I still got Module not found: Can't resolve 'file-selector'.
Add below to package.json resolved the issue.

"resolutions": {
"file-selector": "^v0.2.2"
}

@jhetuts
Copy link

jhetuts commented Oct 23, 2020

That's my bad, I was trying to explicitly include the LICENSE file in the file-sector release and did not include the dist dir. Should be fixed now (see v0.2.2).

run npm uninstall and npm install react-dropzone right?

@rolandjitsu
Copy link
Collaborator

@ex-git You probably need to clean your node_modules to get the latest.

@ex-git
Copy link

ex-git commented Oct 23, 2020

@ex-git You probably need to clean your node_modules to get the latest.

I did. Maybe it will resolve by itself after sometimes.

@sugarpac
Copy link

@rolandjitsu
Would you update dependencies v0.2.2 in package.json?
"dependencies": {
"file-selector": "^0.1.12"
}
this means 0.1.12 <= n < 0.2.0

@rolandjitsu
Copy link
Collaborator

@rolandjitsu
Would you update dependencies v0.2.2 in package.json?
"dependencies": {
"file-selector": "^0.1.12"
}
this means 0.1.12 <= n < 0.2.0

Soon.

@vietsonhs
Copy link

@rolandjitsu I have cleaned my node_modules and delete package-lock. However, i am still getting the same issue. Is it related to what @sugarpac suggested?

@sugarpac
Copy link

sugarpac commented Oct 23, 2020

@rolandjitsu
Would you update dependencies v0.2.2 in package.json?
"dependencies": {
"file-selector": "^0.1.12"
}
this means 0.1.12 <= n < 0.2.0

Soon.

@rolandjitsu
Thanks in advance!

And please also update file-selector@0.1.16 to 0.1.17(including the dist dir fix) for users staying current react-dropzone version v11.2.0

@TrejGun
Copy link

TrejGun commented Oct 23, 2020

same here

@neutraali
Copy link

That's my bad, I was trying to explicitly include the LICENSE file in the file-sector release and did not include the dist dir. Should be fixed now (see v0.2.2).

Still breaking for react-dropzone itself tho.

@okose-me
Copy link

@neutraali If you install it will be fixed -> "file-selector": "^0.2.2"

@mnasyrov
Copy link

@rolandjitsu Please use exact versions for the dependencies.

marusak added a commit to marusak/cockpit-podman that referenced this issue Oct 23, 2020
allisonkarlitskaya pushed a commit to cockpit-project/cockpit that referenced this issue Oct 23, 2020
allisonkarlitskaya pushed a commit to cockpit-project/cockpit-ostree that referenced this issue Oct 23, 2020
allisonkarlitskaya pushed a commit to cockpit-project/cockpit-podman that referenced this issue Oct 23, 2020
@neutraali
Copy link

@neutraali If you install it will be fixed -> "file-selector": "^0.2.2"

@oktaykose Did that a few times now using react-dropzone@11.2.0. Deleted node_modules and reinstalled - file-selector is still @ 0.1.12.

@okose-me
Copy link

@neutraali I think it would be better to use @10.2.1 until the new fix arrives.

@goldafonya
Copy link

@oktaykose I used @10.2.1. It don't work for me.

@okose-me
Copy link

@goldafonya I'm using nextjs@9.5.5, react-dropzone@10.2.1 and file-selector@^0.2.2. I had no problem this way.

@QXJun
Copy link

QXJun commented Oct 23, 2020

Install file-selector@^0.2.2 in your project will be fixed this problem

@barbalex
Copy link

barbalex commented Oct 23, 2020

After installing react-dropzone v11.2.0 the yarn.lock file entry is:

react-dropzone@11.2.0:
  version "11.2.0"
  resolved "https://registry.yarnpkg.com/react-dropzone/-/react-dropzone-11.2.0.tgz#4e54fa3479e6b6bb93f67914e4a27f1260807fdb"
  integrity sha512-S/qaXQHCCg7MVlcrhqd05MLC6DupITLUB0CFn3iCLs6OTjzxdGDF1WTktTe5Jyq8jZdxYfMHNUZOHL0mg+K0Dw==
  dependencies:
    attr-accept "^2.0.0"
    file-selector "^0.1.12"
    prop-types "^15.7.2"

Seems that file-selector is still installed in the wrong version. Which is because of this: https://github.com/react-dropzone/react-dropzone/blob/master/package.json#L94.

Forcing the file-selector version to 0.2.2 using resolutions in yarn works for me.

@nixjs
Copy link

nixjs commented Oct 23, 2020

To fix: Install "file-selector": "^0.2.2"

rolandjitsu added a commit to rolandjitsu/react-dropzone that referenced this issue Oct 23, 2020
@thecodejack
Copy link

temporarily you can also use this for v11.2.0

react-dropzone-tmp@11.2.0

rolandjitsu added a commit to rolandjitsu/react-dropzone that referenced this issue Oct 23, 2020
@github-actions
Copy link

🎉 This issue has been resolved in version 11.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@barbalex
Copy link

Yes, in my app this solves the problem. Thanks!

@dpdhruv
Copy link

dpdhruv commented Oct 23, 2020

Working for us too 🤟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.