I get the following error when trying to use gulp-babel:
Error: Couldn\'t find preset \"es2015\" relative to directory \"/Users/username\"
I just had a really weird one. I installed all the babel tools with one big long npm install command, and everything installed without errors... except it was throwing the error documented in this thread, at runtime.
I noticed the version was 0.0.0 in the package.json file, so I ran npm install --save-dev babel-preset-es2015 again and it worked and placed a SECOND key into my package.json file:
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-core": "^6.24.1",
"babel-polyfill": "^6.23.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-es2015": "0.0.0",
"babel-preset-stage-2": "^6.24.1",
"eslint": "^3.19.0"
}
I just removed the botched entry and it cleared up this relative to directory error.