Transpile error: Couldn't find preset
See original GitHub issueHi. I’m not able to transpile my es6 code to es5 due to the following error:
Couldn't find preset "es2015" relative to directory
This is my environment:
OS: OS X
CLI version 1.2.2
Local version 4.0.0-alpha.2
package.json (partial):
"devDependencies": {
"babel-preset-es2015": "^6.16.0",
"browser-sync": "^2.7.7",
"connect-history-api-fallback": "^1.1.0",
"del": "^2.0.2",
"es6-promise": "^3.1.2",
"glob-all": "^3.0.1",
"gulp": "github:gulpjs/gulp#4.0",
"gulp-autoprefixer": "^3.1.0",
"gulp-babel": "^6.1.2",
...
I have the following project structure:
|-!deploy |-build |—components |—helpers |—node_modules |—tasks |-src |—assets |—components |—js |-----3rd |-------jspdf |-------lz-string |-----ext-store |-----mod |—libs |—style
My gulpfile is inside my build folder and from here I would like to transpile my JavaScript (es6) files sitting inside src/js folder to my !deploy folder.
I have in installed gulpv4, CLI1.2.2, babel-preset-es2015v6.16.0.
Why does gulp-babel reports:
Couldn't find preset "es2015" relative to directory "/Users/tester/Projects/XXX/src"
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Couldn't find preset "env" relative to directory" - Stack Overflow
Receiving this error message Error: Couldn't find preset "env" relative to directory when i run my project npm run dev or npm run...
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 >Vue Portlet cannot start - Forums - Liferay Community
node_modules/babel-loader/lib/index.js): Error: Couldn't find preset "@babel/preset-env" relative to directory "D:\\project\\portal\\lv-project"
Read more >Module build failed: Error: Couldn't find preset - 51CTO博客
F:\WebstormProjects\euw\esa>npm install babel-plugin-component -D npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is ...
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
You should be able to change that to
We expect the presets to be relative to the file being processed, if they are not, you cannot use the string-based preset lookup.
Closing this issue as it’s been inactive for several months. Please feel free to open a new issue or leave a comment asking to reopen this issue. Thanks! ✌️