最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - build failed due to babelrc, presets[0] [1] must be an object, false or undefined - Stack Overflow

programmeradmin3浏览0评论

I'm having issues with babel. I'm trying to use async/await in my application, and for that I needed to add the node option in babelrc. However, I'm getting this error:

I checked this question, but I'm a fair rookie and I don't really see where my problem lies. Plugins[0][1] must be an object, false, or undefined

My babelrc file:

{
  "presets": [
    [
      "@babel/preset-env",
      "@babel/preset-react",
      {
        "targets": {
          "node": "10"
        }
      }
    ]
  ]
}

I'm having issues with babel. I'm trying to use async/await in my application, and for that I needed to add the node option in babelrc. However, I'm getting this error:

I checked this question, but I'm a fair rookie and I don't really see where my problem lies. Plugins[0][1] must be an object, false, or undefined

My babelrc file:

{
  "presets": [
    [
      "@babel/preset-env",
      "@babel/preset-react",
      {
        "targets": {
          "node": "10"
        }
      }
    ]
  ]
}
Share Improve this question asked Feb 26, 2020 at 13:33 Arthur RobaeysArthur Robaeys 3553 silver badges17 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 16

I found my fix:

{
  "presets": [
    [
      "@babel/preset-env",
      {
        "targets": {
          "node": "10"
        }
      }
    ],
    "@babel/preset-react"
  ]
}
发布评论

评论列表(0)

  1. 暂无评论