Couldn't find preset "es2015" relative to directory
See original GitHub issueI use gulp-babel in electron,I have all the dependencies installed. the code is :
function compileJs(cb) {
gulp.src(paths.src.js)
.pipe(babel({
presets: ['es2015', 'stage-2']
}))
.pipe(uglify())
.pipe(gulp.dest(paths.tmp.js))
}
When I was developing, everything was all right. Bug When I packed electron app and run , it throw:
events.js:154 Uncaught Error in plugin 'gulp-babel'
Message:
Couldn't find preset "es2015" relative to directory "/Users/user/WeFlow_workspace/WeFlow-example/src/js"
I don’t know whose fault it is. Can you help me? Thanks.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:9
- Comments:15 (2 by maintainers)
Top Results From Across the Web
Error: Couldn't find preset "es2015" relative to directory "/Users ...
To fix this issue You should remove .babelrc (hidden) file from "/Users/username" directory.
Read more >【Bug】Vue解决Couldn't find preset "es2015" relative to ...
Couldn't find preset “es2015” relative to directory原因由于引入的Element-UI 使用了ES标准,所以编译会报错。解决方法安装ES 标准npm install ...
Read more >Error: Couldn't find preset “es2015” relative to directory “/Users ...
I have the es2015 preset installed globally and locally so can't see why this would be an issue. Below is my gulp set...
Read more >Couldn't find preset "es2015" relative to directory-Reactjs
Coding example for the question Webpack + Babel: Couldn't find preset "es2015" relative to directory-Reactjs.
Read more >Error: Couldn't find preset "es2015" relative to directory "/Users ...
JavaScript : Error: Couldn't find preset " es2015 " relative to directory "/Users/username" [ Gift : Animated Search Engine ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Have you installed these presets via npm?
The correct example would be to use the npm package names, e.g.: