acdlite / recompose

A React utility belt for function components and higher-order components.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot resolve @babel/runtime paths shipped with recompose

otakustay opened this issue Β· comments

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/runtime@7.0.0-beta.56, instead it should be @babel/runtime/helpers/esm/*.js

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/runtime@7.0.0-beta.46 (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
β”œβ”€β”¬ react-scripts@2.0.0-next.3e165448
β”‚ └── @babel/runtime@7.0.0-beta.46 
β”œβ”€β”¬ recompose@0.28.2 
β”‚ └── @babel/runtime@7.0.0-beta.56 
└─┬ yup@0.26.2
  └── @babel/runtime@7.0.0-rc.1 

temporary fix is downgrade to 0.27:

npm i recompose@0.27

ps: I have same problem&solution with yup@0.26.2 πŸ˜„

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 :-(

commented

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.