Create-react-app: missingDeps.some not a function

Created on 15 May 2018  ·  20Comments  ·  Source: facebook/create-react-app

https://github.com/facebook/create-react-app/blob/69cc07f2e3400d01c5db134659c762eb850ae3c8/packages/react-dev-utils/WatchMissingNodeModulesPlugin.js#L25

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.

low (ignored issue template)

Most helpful comment

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

All 20 comments

Please upgrade your Node version.

❯ node --version
v10.1.0

can you please tell me which version I should install?

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

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?

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

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.

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 https://github.com/facebook/create-react-app/issues/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?

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.

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.

Publishing that version is a few months out.

@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.

@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).

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

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...

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).

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

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

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

The problem still exists and has not been resolved。

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

@echenley Thanks! Worked perfectly!

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adrice727 picture adrice727  ·  3Comments

oltsa picture oltsa  ·  3Comments

DaveLindberg picture DaveLindberg  ·  3Comments

ap13p picture ap13p  ·  3Comments

stopachka picture stopachka  ·  3Comments