Async: "Cannot find module 'lodash/_overRest'"

Created on 17 Jan 2017  ·  14Comments  ·  Source: caolan/async

What version of async are you using?
2.1.4

Which environment did the issue occur in (Node version/browser version)
Only in circle-ci (travis-ci is ok, Mac OS X is ok too)

What did you do? Please include a minimal reproducable case illustrating issue.
Only need to 'rerun' circle-ci tests here: https://circleci.com/gh/libp2p/js-libp2p-webrtc-star/224

What did you expect to happen?
At first I would expect it to run just fine, but second, I would expect to be able to find a reference of what is lodash/_overRest, but I've been scavaging through lodash and issues on the web, and it seems no one else is hitting this problem or has a reference where this module exists.

What was the actual result?

Message:
    Cannot find module 'lodash/_overRest'
Details:
    code: MODULE_NOT_FOUND
Stack:
Error: Cannot find module 'lodash/_overRest'
bug

Most helpful comment

I encountered the same issue (async version: 2.1.4 / env: Ubuntu 16.04)
And I think the reason is that package.json requires { lodash: '^4.14.0' }, which is matched by the latest minor versions in which _overRest.js was removed. It's rightfully not considered a breaking change as this is an internal file.

All 14 comments

What version of lodash are you seeing this with (that circle-ci thing isn't openning for me). I tried installing 4.17.4 and I see _overRest in my node_modules. Can you check that node_modules/lodash/_overRest.js exists

Installing it as a dev dependency of the top module solved the issue in CI, although it should have been a dep of async.

I'm still unsure why this only happens in Circle

Hmm, it shows up in my dependencies when I npm install

  "author": {
    "name": "Caolan McMahon"
  },
  "bugs": {
    "url": "https://github.com/caolan/async/issues"
  },
  "dependencies": {
    "lodash": "^4.14.0"
  },
  "description": "Higher-order functions and common patterns for asynchronous code",

Going to close as I can't reproduce

Maybe there is some weird caching going on on circleci which causes this issue?

Couldn't say, let us know if you encounter it again or isolate the issue

On Tue, Jan 17, 2017 at 2:37 PM, Friedel Ziegelmayer <
[email protected]> wrote:

Maybe there is some weird caching going on on circleci which causes this
issue?


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/caolan/async/issues/1352#issuecomment-273275455, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADUIEGlhZNnEjFuSxP4s7sVCA2E-_q6hks5rTRh-gaJpZM4Ll0Pa
.

I encountered the same issue (async version: 2.1.4 / env: Ubuntu 16.04)
And I think the reason is that package.json requires { lodash: '^4.14.0' }, which is matched by the latest minor versions in which _overRest.js was removed. It's rightfully not considered a breaking change as this is an internal file.

I wonder how @jdalton 's work on making webpack-lodash-plugin work with rollup is going. If we had a tool like that, we wouldn't have to rely on lodash internals.

@maxlath _overRest was removed for lodash version 5, not the version 4 release track. We'll look into this again when lodash 5 is out.

https://github.com/lodash/lodash/blob/4.17.4/lodash.js#L6583

@megawac so how come we got this error? I'm confused oO

I am encountering this error and I am not using async module directly. In my app, these are the modules I am using:

    "bcrypt-nodejs": "0.0.3",
    "body-parser": "1.16.1",
    "cookie-parser": "1.4.3",
    "express": "4.14.1",
    "express-session": "1.15.1",
    "module-log": "1.0.0",
    "mongoose": "4.8.5",
    "morgan": "1.8.1"

I am using latest npm and nodejs LTS versions.

I'm encounter the same issue now.
And in lodash 4.17.4, there's no _overRest.js in the module

@amandeepmittal Same problem here caused by Lodash mongoose dependency, tried the last mongoose release 4.11.3 with still the same result.

That's why i'am stuck with mongoose 4.71 in some projects for the moment.

@nicolasbonnici I haven't tried the module in sometime. Let me test and get back to you. It certainly is a dependency issue.

@nicolasbonnici upgrading to the latest version of async should resolve the issue, as the lodash/_overRest dependency was removed in v2.4.0.

@megawac to reproduce:

$ npm install [email protected] --save # another dependency depends on lodash ~4.14.0 or ~4.15.0
$ npm install [email protected] --save

$ npm ls lodash
├─┬ [email protected]
│ └── [email protected]  deduped
└── [email protected]
// index.js

// throws an error as `_overRest` wasn't added until lodash `v4.16.0`
var waterfall = require('async/waterfall');

However, this has been inadvertently fixed since, so I don't think there's anything we need to do.

Was this page helpful?
0 / 5 - 0 ratings