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

missingDeps.some not a function #4466

Closed
ashnur opened this issue May 15, 2018 · 20 comments
Closed

missingDeps.some not a function #4466

ashnur opened this issue May 15, 2018 · 20 comments

Comments

@ashnur
Copy link

ashnur commented May 15, 2018

if (missingDeps.some(file => file.indexOf(nodeModulesPath) !== -1)) {

I am getting

TypeError: missingDeps.some is not a function

It's a SortableSet from here https://github.com/webpack/webpack/blob/master/lib/util/SortableSet.js and it doesn't have a .some method, so I am not sure how to fix this.

@Timer
Copy link
Contributor

Timer commented May 15, 2018

Please upgrade your Node version.

@Timer Timer closed this as completed May 15, 2018
@ashnur
Copy link
Author

ashnur commented May 15, 2018

❯ node --version
v10.1.0

can you please tell me which version I should install?

❯ node
> x = new Set()
Set {}
> x.some
undefined

@ashnur
Copy link
Author

ashnur commented May 15, 2018

https://www.ecma-international.org/ecma-262/8.0/index.html#sec-properties-of-the-set-prototype-object

Set doesn't have some, SortableSet doesn't have some. I don't understand, did some node version have Set with a .some method, ever?

@ashnur
Copy link
Author

ashnur commented May 15, 2018

Thanks @Timer, you really "helped" me. I wish for you to be helped by everyone the same way you handled this issue.

@Timer
Copy link
Contributor

Timer commented May 15, 2018

If you followed the issue template instead of ignoring it we may have been able to provide you with better assistance the first time around.
I'm happy to help if you give us the required information to diagnose your problem.

@ashnur
Copy link
Author

ashnur commented May 16, 2018

Actually, your template says that if I don't know if it's a bug, I don't have to use it.
Second, I think you didn't even read what I wrote first, just closed it being so sure that I am using some 6 year old node version... but it all doesn't matter, because now I took the time which I don't think I should've had, and found this #4366

Yesterday I didn't search between the closed issues because I didn't assume that you would close unsolved issues. Now I know better, having experienced otherwise how things go around here.

I have installed https://www.npmjs.com/package/react-dev-utils @ 5.0.1 which is the latest.

May I ask when the fix will be published on npm too?

@Timer
Copy link
Contributor

Timer commented May 16, 2018

Unfortunately, we do not have enough information to help you.
If you're installing packages like react-dev-utils it sounds like you're ejected, otherwise I'm not sure what you're doing.

I'm sorry if I gave you a terse first response, but most of these issues that come through like this are related to an old Node version.

If you can replicate this with a non-ejected setup, please provide all of the information the issue template states and reproduction steps. I'll close this until more information is provided, as this issue doesn't seem wide-spread.

@Timer Timer closed this as completed May 16, 2018
@ashnur
Copy link
Author

ashnur commented May 16, 2018

I don't have to replicate, you have it fixed already, I just asked when you gonna publish? Until then I am using a local copy of the PR with the fixes. Which is not great, but what can we do? Would be nicer if issues were not closed until the fix is published.

@Timer
Copy link
Contributor

Timer commented May 16, 2018

Publishing that version is a few months out.

@vireshshah
Copy link

@Timer I'm getting same issue. I'm using react-dev-utils package (5.0.1) and it's ejected version. I tried upgrade to react-dev-utils@next as well but no luck. Can you please help?

TypeError: missingDeps.some is not a function at compiler.plugin (/hello/node_modules/react-dev-utils/WatchMissingNodeModulesPlugin.js:25:23) at _err0 (eval at create (/hello/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:12:1) at Promise.resolve.then.then.then.then.then.then.then.then.catch.then.then.then (/hello/node_modules/html-webpack-plugin/index.js:224:11) at <anonymous> error An unexpected error occurred: "Command failed.

@ashnur
Copy link
Author

ashnur commented May 22, 2018

@vireshshah we are going to have to wait "a few months". :) Until then I suggest to you to use a local copy of the repo where you can apply the patches you need. (or use an earlier version of webpack).

@SimpleCookie
Copy link

Also having the same issue. Not sure how to come around it yet. @ashnur which webpack version would solve the problem, do you know?

@ashnur
Copy link
Author

ashnur commented May 30, 2018

I really don't know, I am just assuming that this is about version 4, 3 should work then. Ask @Timer which version they suggest you to use...

@Timer
Copy link
Contributor

Timer commented May 30, 2018

The current version of react-dev-utils only supports webpack 3.

You cannot use webpack 4 unless if you re-write a significant portion of tooling yourself, or wait for the release of react-scripts@^2 (which is a couple months out).

@echenley
Copy link

echenley commented Jul 26, 2018

@ashnur This appears to be fixed in the Webpack 4 upgrade PR, which is available via [email protected].

@vireshshah
Copy link

vireshshah commented Jul 27, 2018

Finally we got this working by using 5.0.0-webpack4 of react-dev-utils-for-webpack4 package.

@Niulimei
Copy link

npm install react-dev-utils-for-webpack4 ?

The problem still exists and has not been resolved。

@nuc
Copy link

nuc commented Aug 6, 2018

@echenley Thanks man! Next round of beers on me 🍻

@juanparadox
Copy link

@echenley Thanks! Worked perfectly!

@Sowed
Copy link

Sowed commented Sep 16, 2018

@echenley, you deserve a special place in heaven with free WiFi.

@facebook facebook locked as resolved and limited conversation to collaborators Sep 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants