Error: Couldn't find preset
See original GitHub issueAm on babelify version 7.1, and browserify version 12.0.1.
I’m using the CLI to create a build file, and am getting an error. As far as I can tell, I’m doing everything the vanilla, correct way. If I take out presets option, I get unexepcted token errors.
Here’s the command I’m running:
browserify -e src/index.js -t [ babelify --presets es2015 ] -o dist/mandolin.js -s mandolin
And here’s the error and stack:
Error: Couldn't find preset while parsing file: <root_dir>/src/index.js
at OptionManager.mergePresets (<root_dir>/node_modules/babelify/node_modules/babel-core/lib/transformation/file/options/option-manager.js:309:17)
at OptionManager.mergeOptions (<root_dir>/node_modules/babelify/node_modules/babel-core/lib/transformation/file/options/option-manager.js:269:12)
at OptionManager.init (<root_dir>/node_modules/babelify/node_modules/babel-core/lib/transformation/file/options/option-manager.js:395:10)
at File.initOptions (<root_dir>/node_modules/babelify/node_modules/babel-core/lib/transformation/file/index.js:191:75)
at new File (<root_dir>/node_modules/babelify/node_modules/babel-core/lib/transformation/file/index.js:122:22)
at Pipeline.transform (<root_dir>/node_modules/babelify/node_modules/babel-core/lib/transformation/pipeline.js:42:16)
at Babelify._flush (<root_dir>/node_modules/babelify/index.js:28:24)
at Babelify.<anonymous> (_stream_transform.js:130:12)
at Babelify.g (events.js:180:16)
at Babelify.EventEmitter.emit (events.js:117:20)
Issue Analytics
- State:
- Created 8 years ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Couldn't find preset "env" relative to directory - Stack Overflow
Basically, this type of error occurs due to mismatch in versions of babel-core, babel-preset-env and babel-loader.
Read more >Babel Couldn't find preset "@babel/preset-env"(with ... - GitHub
im getting Couldn't find preset "@babel/preset-env" error with message Error: Couldn't find preset "@babel/preset-env" relative to directory ...
Read more >Error: Couldn't find preset "@babel/preset-env" relative to ...
Hi, I'm trying to run the project locally on my Windows machine. Unfortunately, v-click-outside is trying to resolve preset ...
Read more >Couldn't find preset "env" relative to directory Error while ...
Getting error while running jss start at my local, attached screen shot for same." Couldn't find preset "env" relative to directory ...
Read more >Error: Couldn't find preset “es2015” relative to directory - 北鱼IT
Error: Couldn't find preset “es2015” relative to directory. 问题. 使用babel转换代码时报如下错误:.
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
$ npm install --save-dev babel-preset-stage-3
was solution for me
Googled around a bit and this solved my issue: Install
babel-preset-es2015
via NPM and alsobabel-preset-react
if you’re also running React.