-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning: Couldn't find preset "env" relative to directory #91
Comments
Could you please share your package.json? have you installed |
Sure, Thanks for quick response { |
Thanks, have you tried with earlier betas? I think your issue is due to the new config resolution. I would recommend you using babel.config.js at the root of your project. The configuration there will be applied everywhere in your project. |
I've added that in root, but how do i link Gruntfile.js to this file? |
Could you please share your gruntfile? |
Hi,
I don't think this is anyhow connected to contat/uglify. |
I started afresh.
Without With Node is v9.11.1, btw. |
Switched to this "env" instead https://babeljs.io/docs/plugins/preset-env |
Having a similar situation in one of our workflow repos. In my Babel task...
In my package.json
Error on
Tried to replace the No joy. 🤔 |
Hi @davetgreen Since I made this work then you can too :) My Gruntfile.js has babel task configed this way:
And .babelrc in same folder:
|
I have the same problem and was fixed by add .babelrc file. // babel.config.js
module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current',
},
},
],
],
plugins: ['transform-flow-strip-types'],
}; and after add file:
It start work. |
Hi Guys
I need to use babel in one project and I've installed and i get this error when running grunt (edited)
Warning: Couldn't find preset "env" relative to directory "/Users/essteffan/Sites/div//live..ro/web" Use --force to continue.
I'm using Grunt
and i have a concat before babel and after i have an uglify
My babel config is:
babel: {
options: {
sourceMap: true,
presets: ['@babel/preset-env']
},
dist: {
files: {
'../js/app.min.js': '../js/app.js'
}
}
},
If i comment this line i have no errors: '../js/app.min.js': '../js/app.js'
Somehow i thing around there is the problem.
Could you please advice how to make it work?
The text was updated successfully, but these errors were encountered: