Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Error with lodash/fp from jest #179

Closed
namjul opened this issue Jun 29, 2017 · 2 comments
Closed

Error with lodash/fp from jest #179

namjul opened this issue Jun 29, 2017 · 2 comments
Labels

Comments

@namjul
Copy link

namjul commented Jun 29, 2017

Hi everybody,

today we had an Error ReferenceError: /path/to/file.js: Container is falsy with the following callstack

      at NodePath._replaceWith (node_modules/babel-traverse/lib/path/replacement.js:170:11)
      at NodePath.replaceWith (node_modules/babel-traverse/lib/path/replacement.js:160:8)
      at node_modules/babel-plugin-lodash/lib/index.js:144:23
      at arrayEach (node_modules/lodash/_arrayEach.js:15:9)
      at forEach (node_modules/lodash/forEach.js:38:10)
      at node_modules/babel-plugin-lodash/lib/index.js:130:30
      at arrayEach (node_modules/lodash/_arrayEach.js:15:9)
      at forEach (node_modules/lodash/forEach.js:38:10)
      at node_modules/babel-plugin-lodash/lib/index.js:115:28
      at arrayEach (node_modules/lodash/_arrayEach.js:15:9)

The location of the last call would be https://github.com/babel/babel/blob/6.x/packages/babel-traverse/src/path/replacement.js#L168

This happens after starting jest tests. Jest uses the .babelrc https://facebook.github.io/jest/docs/getting-started.html#using-babel

I could further break it down to the usages of property and flatten functions imported from lodash/fp.

I also updated to the latests babel 6 version.

Any ideas what could cause this?

@namjul namjul changed the title lodash/fp from jest Error with lodash/fp from jest Jun 29, 2017
@jdalton
Copy link
Member

jdalton commented Jun 29, 2017

Hi @namjul, this looks like a jest issue.

@jdalton jdalton closed this as completed Jun 29, 2017
@namjul
Copy link
Author

namjul commented Jun 29, 2017

thx for hint.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants