Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Couldn't find preset "airbnb" relative to directory

Tags:

reactjs

enzyme

I'm trying to set up Enzyme (written by Airbnb) in order to run some UI tests in React. However, no matter what configuration I have (and I've tried several) I keep getting this error. I added a .babelrc file which has the following inside:

{
  "presets": ["airbnb"]
}

but it still gives me the same error. The .babelrc file is on the same level as the package.json file. I've searched everywhere online to see what could be causing this, but I'm at a loss. Any ideas?

like image 974
reectrix Avatar asked Jul 25 '16 14:07

reectrix


1 Answers

make sure to install the preset

npm install --save-dev babel-preset-airbnb
like image 91
nuway Avatar answered Oct 02 '22 08:10

nuway