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

Doesn't include "extract-files" module when install. #120

Closed
heygema opened this issue Oct 13, 2018 · 4 comments
Closed

Doesn't include "extract-files" module when install. #120

heygema opened this issue Oct 13, 2018 · 4 comments

Comments

@heygema
Copy link

heygema commented Oct 13, 2018

I had a problem, when I installed apollo-upload-client on my project.
It doesn't include "extract-files" module. so it then got me error like

extractFiles is not a function

as it is undefined, so I had to hardcoded it.
I use :

  • yarn to install apollo-upload-client.
  • MacOSX 10.13.3 High Sierra.

I'm not sure if this problem also happened to anybody else.
just want to inform this.
thanks before 🙂

@heygema heygema changed the title [Bug] Doesn't include "extract-files" module when install. Doesn't include "extract-files" module when install. Oct 13, 2018
@jaydenseric
Copy link
Owner

It's not clear what you mean by "doesn't include". Is it not installed in your node_modules?

I suppose you mean to say that Webpack is not resolving the extractFiles named import correctly? Make sure that Webpack is not misconfigured; it should resolve .mjs files before .js. See #118 and #117.

@heygema
Copy link
Author

heygema commented Oct 13, 2018

I think when I looked into lib/index.js

it tries to import extractFiles from module "extract-files"

const {extractFiles, ReactNativeFile} = require("extract-files");

but the "extract-files" doesn't seem to be anywhere.
Oh, is it the bug from my CRA ?

@jaydenseric
Copy link
Owner

jaydenseric commented Oct 13, 2018

Extract files is definitely a dependency, so if it's not in your node_modules anywhere (search your package-lock.json) you have some sort of npm/yarn install bug:

"extract-files": "^4.0.0"

@heygema
Copy link
Author

heygema commented Oct 13, 2018

Found the problem,
Forgot to mention that I use reason-scripts,
I think the problem related to #118 and it was then fixed in CRA latest release.
So possibly I will look into reason-scripts to open an issue for this.

thanks ! @jaydenseric

@heygema heygema closed this as completed Oct 13, 2018
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