Recompose: Cannot resolve @babel/runtime paths shipped with recompose

Created on 4 Aug 2018  ยท  17Comments  ยท  Source: acdlite/recompose

recompose/dist/Recompose.esm.js imports several modules from @babel/runtime:

import _extends from '@babel/runtime/helpers/builtin/es6/extends';
import _inheritsLoose from '@babel/runtime/helpers/builtin/es6/inheritsLoose';
import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/builtin/es6/objectWithoutPropertiesLoose';

There is no helpers/builtin/es6 directory under @babel/[email protected], instead it should be @babel/runtime/helpers/esm/*.js

Most helpful comment

0.28.2 please check

All 17 comments

same issue

same issue

I moved back to this version for now:
"recompose": "0.27"

also having the issue.

@Is-endurance not sure if you already know since patch version not mentioned, but 0.27.1 is the latest I see that seems to work, specifically ๐Ÿ˜ƒ
https://github.com/acdlite/recompose/releases

I went into node_modules and did what @otakustay recommended and it fixed it!

Same issue here

./node_modules/recompose/dist/Recompose.esm.js
Module not found: Can't resolve '@babel/runtime/helpers/builtin/es6/extends' in '/project_folder_path/node_modules/recompose/dist'

I'd like to mark this issue as high-priority. The changes made here are trickling down to other, larger dependencies.

Additionally, this change breaks semver:

MINOR version when you add functionality in a backwards-compatible manner

The PR fixing this issue already exists, BTW we have issue with releases now, seems like something has seriously changed in babel. Just use 0.27 for now

the same:
image

Just here to mention that this also happens with other @babel/runtime versions. Same behavior here with @babel/[email protected] (default version on create-react-app 2.0, currently). So I'm guessing this has to be related to some meddling transitive dependency.

0.28.2 please check

0.28.2 seems to have fixed the issue for me.

0.28.2 fixed it, thanks!

I have same error:

Failed to compile.

./node_modules/recompose/dist/Recompose.esm.js
Module not found: Can't resolve '@babel/runtime/helpers/esm/extends'  in '.../node_modules/recompose/dist'
-> % npm list recompose @babel/runtime
โ”œโ”€โ”ฌ [email protected]
โ”‚ โ””โ”€โ”€ @babel/[email protected] 
โ”œโ”€โ”ฌ [email protected] 
โ”‚ โ””โ”€โ”€ @babel/[email protected] 
โ””โ”€โ”ฌ [email protected]
  โ””โ”€โ”€ @babel/[email protected] 

temporary fix is downgrade to 0.27:

npm i [email protected]

ps: I have same problem&solution with [email protected] :smile:

This has flamed back up in my project. I have spent a few hours trying out all kinds of combinations of different versions of @babel/runtime and recompose, including fixing them via yarn resolutions in package.json. And clearing out node_modules and yarn cache. Nothing seems to work any more :-(

Yup, also seeing this again, sticking with 0.27 seems to be the solution for now.

Any updates?

  1. Use latest
  2. See that you have latest babel 7.0.0, install it properly, check that you don't have 10th versions of babel runtime etc

I'll close this, that except two minor versions this was fixed. And if you have any problems just check npm ls, yarn why etc why you have multiple babel runtime versions etc.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gajus picture gajus  ยท  4Comments

SeanGroff picture SeanGroff  ยท  4Comments

xialvjun picture xialvjun  ยท  4Comments

rockchalkwushock picture rockchalkwushock  ยท  3Comments

jeron-diovis picture jeron-diovis  ยท  4Comments