preactjs / preact-compat

ATTENTION: The React compatibility layer for Preact has moved to the main preact repo.
http://npm.im/preact-compat
MIT License
950 stars 148 forks source link

babel-core may be outdated #530

Closed fsultani-aspiration closed 5 years ago

fsultani-aspiration commented 5 years ago

@babel/core lists 7.4.5 as the current version, yet preact-compat is using ^6.26.3. Is this outdated?

I keep getting an error in my app:

Error: Requires Babel "^7.0.0-0", but was loaded with "6.26.3". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel.

I'm wondering if they're related.

marvinhagemeister commented 5 years ago

That error is not caused by preact-compat. We only use babel during development itself. Users will never install it as because it's flagged as a devDependency. The most likely cause it's that you have some other dependency in your project which marked dependencies intended for development incorrectly. You can check who installed it with yarn via yarn why babel-core. There is a similar command for npm, but I don't know off the top of my head how it is called. A quick Google search should point you to it.