redux-pack: Couldn't find preset "airbnb"

I don’t use babel-preset-airbnb in my current project.

Seem your dependencies deline required airbnb preset. Hum… I got this error. screen shot 2017-03-16 at 12 00 12 pm

I don’t know where should i raise issue (this one or deline one)?

I resolve this issue by:

  • yarn add --dev babel-preset-airbnb (or npm install --save-dev babel-preset-airbnb)
  • add airbnb to presets array in .babelrc

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 2
  • Comments: 26 (1 by maintainers)

Most upvoted comments

The root cause is that the RNP incorrectly transpiles code inside node_modules, by design.

Actually, I was able to fix this issue by simply removing the .babelrc file from deline. I was removing babelrc from redux-pack but deline is the broken dependency that couldn’t run on RN.

Resolved!

So, I had a similar error, except it was on the react-native package (I’m not building a react-native app):

ERROR in ../~/redux-pack/lib/index.js
Module build failed: Error: Couldn't find preset "react-native" relative to directory "/Users/me/site/node_modules/redux-pack"
    at /Users/me/site/node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/me/site/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
    at OptionManager.mergePresets (/Users/me/site/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
    at OptionManager.mergeOptions (/Users/me/site/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
    at OptionManager.init (/Users/me/site/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at File.initOptions (/Users/me/site/node_modules/babel-core/lib/transformation/file/index.js:212:65)
    at new File (/Users/me/site/node_modules/babel-core/lib/transformation/file/index.js:135:24)
    at Pipeline.transform (/Users/me/site/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at transpile (/Users/me/site/node_modules/babel-loader/lib/index.js:46:20)
    at Object.module.exports (/Users/me/site/node_modules/babel-loader/lib/index.js:163:20)
 @ ./app.js 19:17-38

Fixed by installing installing babel-preset-react-native

Now I’m on this issue and fixed it by installing and enabled babel-preset-airbnb and that fixed all the compile issues I was having.

I’m guessing issue is being caused by .babelrc - https://github.com/lelandrichardson/redux-pack/blob/master/.babelrc