Redux: Cannot find module "lodash/_isHostObject" from "lodash/isPlainObject"

Created on 6 Feb 2016  Β·  19Comments  Β·  Source: reduxjs/redux

When using redux version 3.3.0 w/ Node 5.5.0 and Npm version 3.7.2 I am getting

Cannot find module "lodash/_isHostObject" from "lodash/isPlainObject" errors.

app.js:79Uncaught Error: Cannot find module "lodash/_isHostObject" from "lodash/isPlainObject"require @ app.js:79expanded @ app.js:56(anonymous function) @ app.js:121(anonymous function) @ isPlainObject.js:3initModule @ app.js:63require @ app.js:73expanded @ app.js:56(anonymous function) @ app.js:121(anonymous function) @ createStore.js:9initModule @ app.js:63require @ app.js:73expanded @ app.js:56(anonymous function) @ index.js:2(anonymous function) @ app.js:121(anonymous function) @ index.js:8initModule @ app.js:63require @ app.js:73expanded @ app.js:56(anonymous function) @ NPCList.js:4initModule @ app.js:63require @ app.js:73expanded @ app.js:56(anonymous function) @ test_the_test_framework.spec.js:3initModule @ app.js:63require @ app.js:73(anonymous function) @ socket.js:62

I was able to fix this earlier by downgrading lodash in the package.json of redux but it doesn't not seem to work anymore.

Please let me know if you need any further information and I will be happy to provide.

Thank you for all your hard work.

Most helpful comment

I had this problem with brunch and phoenix:

app.js:79 Uncaught Error: Cannot find module "lodash/_getPrototype" from "lodash/isPlainObject"

Fixed it with updating brunch to at least 2.2.3.

All 19 comments

Can you please delete your node_modules folder and run npm install again?
The relevant file is definitely there:

screen shot 2016-02-06 at 21 02 14

My only guess would be that your npm install failed for some reason, and not all files were downloaded.

Another possibility is that you have some kind of unusual build configuration that assumes too much about Lodash. For example, if you have a custom resolve Webpack option (or equivalent) that resolves Lodash to something else than its normal directory, thus possibly directing it at a build with a different version.

Finally,

I was able to fix this earlier by downgrading lodash in the package.json of redux but it doesn't not seem to work anymore.

This might be the reason something is broken. If you change package.json of the packages in node_modules they can break later ;-).

I’m happy to continue the discussion but it seems like a problem with your particular build configuration. If cleaning node_modules does not help, please post a project reproducing the issue, and we will take a look.

Thank you for getting back to me so quickly I'm sure it something to do w/ my setup.

I did the steps below and I am still getting the same error. It's worth mentioning I am using Brunch as my build tool.

Link to my project:
https://github.com/st23am/PhoenixReactReduxStarter/tree/presentation

@gaearon let me know if you need any other information.

ΒΆ ~/src/PhoenixReactReduxStarter (presentation*) $ rm -rf ~/.npm/
ΒΆ ~/src/PhoenixReactReduxStarter (presentation*) $ rm -rf node_modules/
ΒΆ ~/src/PhoenixReactReduxStarter (presentation*) $ npm cache clean
ΒΆ ~/src/PhoenixReactReduxStarter (presentation*) $ npm cache clear
ΒΆ ~/src/PhoenixReactReduxStarter (presentation*) $ npm install
npm WARN prefer global [email protected] should be installed with -g

> [email protected] install /Users/st23am/src/PhoenixReactReduxStarter/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

[fsevents] Success: "/Users/st23am/src/PhoenixReactReduxStarter/node_modules/fsevents/lib/binding/Release/node-v47-darwin-x64/fse.node" is installed via remote
/Users/st23am/src/PhoenixReactReduxStarter
β”œβ”€β”¬ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ └─┬ [email protected]
β”‚ β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚   β”‚ └── [email protected]
β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚   β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚   β”‚ β”‚ └─┬ [email protected]
β”‚ β”‚   β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚   β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚   β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚   β”‚ β”‚   └── [email protected]
β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚   β”‚ └── [email protected]
β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚   β”‚ └── [email protected]
β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚   β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚   β”‚ β”‚ └── [email protected]
β”‚ β”‚   β”‚ └── [email protected]
β”‚ β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚   β”‚ └── [email protected]
β”‚ β”‚   └─┬ [email protected]
β”‚ β”‚     β”œβ”€β”€ [email protected]
β”‚ β”‚     └── [email protected]
β”‚ └─┬ [email protected]
β”‚   β”œβ”€β”¬ [email protected]
β”‚   β”‚ β”œβ”€β”¬ [email protected]
β”‚   β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚   β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚   β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚   β”‚ β”‚ β”‚ └── [email protected]
β”‚   β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚   β”‚ β”‚ └── [email protected]
β”‚   β”‚ β”œβ”€β”¬ [email protected]
β”‚   β”‚ β”‚ └── [email protected]
β”‚   β”‚ └─┬ [email protected]
β”‚   β”‚   └─┬ [email protected]
β”‚   β”‚     └── [email protected]
β”‚   β”œβ”€β”¬ [email protected]
β”‚   β”‚ β”œβ”€β”¬ [email protected]
β”‚   β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚   β”‚ β”‚ └── [email protected]
β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚   β”‚ └── [email protected]
β”‚   β”œβ”€β”€ [email protected]
β”‚   β”œβ”€β”€ [email protected]
β”‚   β”œβ”€β”¬ [email protected]
β”‚   β”‚ β”œβ”€β”¬ [email protected]
β”‚   β”‚ β”‚ └── [email protected]
β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚   β”‚ └─┬ [email protected]
β”‚   β”‚   └── [email protected]
β”‚   β”œβ”€β”€ [email protected]
β”‚   β”œβ”€β”¬ [email protected]
β”‚   β”‚ └── [email protected]
β”‚   β”œβ”€β”¬ [email protected]
β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚   β”‚ └── [email protected]
β”‚   β”œβ”€β”¬ [email protected]
β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚   β”‚ └── [email protected]
β”‚   β”œβ”€β”€ [email protected]
β”‚   β”œβ”€β”€ [email protected]
β”‚   β”œβ”€β”€ [email protected]
β”‚   β”œβ”€β”€ [email protected]
β”‚   β”œβ”€β”¬ [email protected]
β”‚   β”‚ └─┬ [email protected]
β”‚   β”‚   β”œβ”€β”€ [email protected]
β”‚   β”‚   └── [email protected]
β”‚   β”œβ”€β”€ [email protected]
β”‚   β”œβ”€β”€ [email protected]
β”‚   β”œβ”€β”€ [email protected]
β”‚   β”œβ”€β”€ [email protected]
β”‚   └── [email protected]
β”œβ”€β”¬ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ └─┬ [email protected]
β”‚ β”‚   └── [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ └─┬ [email protected]
β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚   └─┬ [email protected]
β”‚ β”‚     └── [email protected]
β”‚ └─┬ [email protected]
β”‚   └── [email protected]
β”œβ”€β”¬ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ └─┬ [email protected]
β”‚ β”‚   └── [email protected]
β”‚ └── [email protected]
β”œβ”€β”¬ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ └─┬ [email protected]
β”‚   β”œβ”€β”¬ [email protected]
β”‚   β”‚ └── [email protected]
β”‚   └─┬ [email protected]
β”‚     β”œβ”€β”¬ [email protected]
β”‚     β”‚ └── [email protected]
β”‚     └── [email protected]
β”œβ”€β”¬ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ └─┬ [email protected]
β”‚ β”‚ β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ └── [email protected]
β”‚ β”‚ β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ └── [email protected]
β”‚ β”‚ β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚   β”‚ └─┬ [email protected]
β”‚ β”‚ β”‚   β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚   β”‚ └─┬ [email protected]
β”‚ β”‚ β”‚   β”‚   β”‚   └── [email protected]
β”‚ β”‚ β”‚   β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚   └── [email protected]
β”‚ β”‚ β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ └── [email protected]
β”‚ β”‚ β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ └─┬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚   └── [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ └─┬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚   └── [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ └── [email protected]
β”‚ β”‚ β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ └─┬ [email protected]
β”‚ β”‚ β”‚   β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚   β”‚ └── [email protected]
β”‚ β”‚ β”‚   β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚   β”‚ └─┬ [email protected]
β”‚ β”‚ β”‚   β”‚   β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚   β”‚   └── [email protected]
β”‚ β”‚ β”‚   β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚   β”‚ └── [email protected]
β”‚ β”‚ β”‚   β”‚   └── [email protected]
β”‚ β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚   β”‚ └── [email protected]
β”‚ β”‚ β”‚   └─┬ [email protected]
β”‚ β”‚ β”‚     β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚     β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚     β”‚ └─┬ [email protected]
β”‚ β”‚ β”‚     β”‚   └─┬ [email protected]
β”‚ β”‚ β”‚     β”‚     β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚     β”‚     └── [email protected]
β”‚ β”‚ β”‚     β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚     β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚     β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚     β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚     β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚     β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚     β”‚ └── [email protected]
β”‚ β”‚ β”‚     β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚     β”‚ └─┬ [email protected]
β”‚ β”‚ β”‚     β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚     β”‚   β”‚ └── [email protected]
β”‚ β”‚ β”‚     β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚     β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚     β”‚   β”‚ └─┬ [email protected]
β”‚ β”‚ β”‚     β”‚   β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚     β”‚   β”‚   └── [email protected]
β”‚ β”‚ β”‚     β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚     β”‚   β”‚ └── [email protected]
β”‚ β”‚ β”‚     β”‚   └── [email protected]
β”‚ β”‚ β”‚     └── [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ └─┬ [email protected]
β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚   └─┬ [email protected]
β”‚ β”‚     β”œβ”€β”€ [email protected]
β”‚ β”‚     β”œβ”€β”€ [email protected]
β”‚ β”‚     β”œβ”€β”€ [email protected]
β”‚ β”‚     β”œβ”€β”€ [email protected]
β”‚ β”‚     └── [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ └─┬ [email protected]
β”‚ β”‚ β”‚   β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚   β”‚ └── [email protected]
β”‚ β”‚ β”‚   └── [email protected]
β”‚ β”‚ └─┬ [email protected]
β”‚ β”‚   └── [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ └─┬ [email protected]
β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚   └── [email protected]
β”‚ └── [email protected]
β”œβ”€β”¬ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ └── [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”¬ [email protected]
β”‚ └─┬ [email protected]
β”‚   β”œβ”€β”€ [email protected]
β”‚   └─┬ [email protected]
β”‚     └── [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”¬ [email protected]
β”‚ └── [email protected]
β”œβ”€β”¬ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚ └─┬ [email protected]
β”‚ β”‚ β”‚   └── [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚ └─┬ [email protected]
β”‚ β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚   └── [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ └── [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”¬ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ └─┬ [email protected]
β”‚ β”‚   └── [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ └── [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”¬ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ └── [email protected]
β”‚ └─┬ [email protected]
β”‚   β”œβ”€β”€ [email protected]
β”‚   β”œβ”€β”¬ [email protected]
β”‚   β”‚ └── [email protected]
β”‚   β”œβ”€β”€ [email protected]
β”‚   └── [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”¬ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ └─┬ [email protected]
β”‚   └── [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”¬ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ └── [email protected]
β”‚ └── [email protected]
β”œβ”€β”¬ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ └─┬ [email protected]
β”‚ β”‚   β”œβ”€β”€ [email protected]
β”‚ β”‚   └── [email protected]
β”‚ └─┬ [email protected]
β”‚   └── [email protected]
β”œβ”€β”¬ [email protected]
β”‚ └─┬ [email protected]
β”‚   β”œβ”€β”€ [email protected]
β”‚   β”œβ”€β”€ [email protected]
β”‚   β”œβ”€β”€ [email protected]
β”‚   └─┬ [email protected]
β”‚     β”œβ”€β”€ [email protected]
β”‚     β”œβ”€β”€ [email protected]
β”‚     β”œβ”€β”€ [email protected]
β”‚     └── [email protected]
└── [email protected]

Is this supposed to work with NPM out of the box?
npm install fails because of

    "phoenix": "file:deps/phoenix",
    "phoenix_html": "file:deps/phoenix_html",

in package.json

@st23am

This is not enough information. I installed your project, removed the deps that were failing, and now I don’t know what to do. In scripts field, I see only test which seems irrelevant.

I looked at the README, and it doesn’t explain how to build the project to reproduce the problem. I don’t know what mix deps.get or mix phoenix.server is, and I don’t think these tools are necessary to reproduce a problem with npm.

I would like to help you, but it is hard right now :-). A much more efficient way to get help would be to:

  1. Remove anything unrelated to npm (Phoenix?) from the project and verify it still fails
  2. Remove all dependencies unrelated to the problem and verify it still fails
  3. Provide instructions to reproduce the problem in README
  4. Provide a script to build the project in scripts field in package.json
  5. Make sure it doesn’t depend on third-party tools people may not reasonably have installed

@gaearon Sorry for not getting back to you earlier. The phoenix dependencies are generated upon initial compilation by mix deps.get and mix deps.compile Mix is the build tool for the Elixir programming language, the language Phoenix the server side web framework I am using is built in.

I'll remove the Phoenix dependencies and the other unrelated ones on this branch and update the README as you us suggested.

I was able to temporality get around my issue by using webpack in another branch. So I suspect this all has something to do with something brunch is doing. If that is the case and I can confirm I'll open up an issue there.

Thank you for all of your help. I really appreciate it and apologize for not providing better information.

Thanks. I will keep this open in the meantime since we (mostly) determined the issue seems to be with Brunch. We want Redux to be usable for Brunch users so if there is something we need to do to fix it, we will do it. Please come back with a more minimal repro!

I ran into the same problem (also using phoenix) and tried to create a more minimal example to reproduce the issue: https://github.com/savuori/redux_issue_1371
Hope it helps!

I would try to check whether the underlying issue is in https://github.com/yavorsky/deppack which is what Brunch seems to use internally. As you can see in the bundled code, lodash/_isHostObject is referenced but is mysteriously missing from the output.

Thank you again for an easy way to reproduce.
The issue is caused by this line of code in Brunch:

  if (conventions.ignored == null) {
    conventions.ignored = paths.ignored || [/[\\\/]_/, /vendor[\\\/](node|j?ruby-.*|bundle)[\\\/]/];
  }

If you don’t explicitly specify conventions, Brunch decides that any file starting with an underscore is not worth including into the build, regardless of whether it is referenced by other files. In this case, it produces a broken build, as the module is referenced but not included.

Β―_(ツ)_/Β―

The temporary fix would be to explicitly specify conventions.ignored as a more restrictive regex in your Brunch config. A permanent fix would be to raise an issue on Brunch issue tracker, describe the problem, and maybe contribute a fix.

This problem is fixed in the current version of brunch (2.2.3).

Great, thanks!

I also ran into this error with node 5.3.0 and npm 3.3.12. A second npm install fixed it.

i should have read this thread till @savuori comment few days ago :)

I had this problem with brunch and phoenix:

app.js:79 Uncaught Error: Cannot find module "lodash/_getPrototype" from "lodash/isPlainObject"

Fixed it with updating brunch to at least 2.2.3.

@sobolevn do you know which dependency in brunch was causing the error? I am having the same exact problem right now but I dont have brunch installed. The weird part is that my colleague has no issues with the same node_modules installed in the project directory.

@AlexCppns something with lodash I guess. Can not say any other details, sorry.

@sobolevn do you know which dependency in brunch was causing the error?

Please see my comment above: https://github.com/reactjs/redux/issues/1371#issuecomment-181492968.


If you have this error it means that:

  • Either your build tool of choice (e.g. older version of brunch) erroneously forgot to include the imported lodash module in the build.
  • Or your npm install got interrupted and you need to run it again.

I had to roll back to 1.42, didn't work after a clean install for me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CellOcean picture CellOcean  Β·  3Comments

jimbolla picture jimbolla  Β·  3Comments

timdorr picture timdorr  Β·  3Comments

ms88privat picture ms88privat  Β·  3Comments

cloudfroster picture cloudfroster  Β·  3Comments