titov_andrei
@titov_andrei
All my life I learn - and die a fool!

В чём может быть ошибка при компиляции babel?

andrew@HIGH-PC MINGW64 /e/CODE/JS/pepelatz-next-server
$ yarn dev
yarn run v1.7.0
$ nodemon --exec babel-node src/index.js
[nodemon] 1.18.3
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: E:\CODE\JS\pepelatz-next-server/**/*
[nodemon] starting `babel-node src/index.js`
E:\CODE\JS\pepelatz-next-server\node_modules\@babel\core\lib\config\full.js:127
    throw e;
    ^

Error: [BABEL] E:\CODE\JS\pepelatz-next-server\src\index.js: The 'polyfill' option has been removed. The @babel/runtime module now skips polyfilling by default. (While processing: "E:\\CODE\\JS\\pepelatz-nex
t-server\\node_modules\\@babel\\plugin-transform-runtime\\lib\\index.js")
    at _default (E:\CODE\JS\pepelatz-next-server\node_modules\@babel\plugin-transform-runtime\lib\index.js:82:13)
    at E:\CODE\JS\pepelatz-next-server\node_modules\@babel\helper-plugin-utils\lib\index.js:19:12
    at loadDescriptor (E:\CODE\JS\pepelatz-next-server\node_modules\@babel\core\lib\config\full.js:157:14)
    at cachedFunction (E:\CODE\JS\pepelatz-next-server\node_modules\@babel\core\lib\config\caching.js:32:19)
    at loadPluginDescriptor (E:\CODE\JS\pepelatz-next-server\node_modules\@babel\core\lib\config\full.js:192:28)
    at config.plugins.map.descriptor (E:\CODE\JS\pepelatz-next-server\node_modules\@babel\core\lib\config\full.js:68:16)
    at Array.map (<anonymous>)
    at recurseDescriptors (E:\CODE\JS\pepelatz-next-server\node_modules\@babel\core\lib\config\full.js:67:38)
    at loadFullConfig (E:\CODE\JS\pepelatz-next-server\node_modules\@babel\core\lib\config\full.js:100:6)
    at loadOptions (E:\CODE\JS\pepelatz-next-server\node_modules\@babel\core\lib\config\index.js:27:36)
[nodemon] app crashed - waiting for file changes before starting...


.babelrc
{
  "presets": [
    [
      "@babel/preset-env",
      {
        "targets": {
        "node": "9"
        }
      }  
    ]    
  ],
  "plugins": [
    "import-graphql",
    [
      "@babel/plugin-transform-runtime",
      {
        "polyfill": false,
        "regenerator": true
      }
    ]
  ]
}


nodemon.json
{
  "ignore": ["node_modules"],
  "env": {
    "NODE_ENV": "development",
    "BABEL_DISABLE_CACHE": 1,
    "PORT": 3001,
    "URL": "http://localhost"
  },
  "execMap": {
    "js": "babel-node"
  },
  "ext": ".js,.json,.gql",
  "watch": "./"
}
  • Вопрос задан
  • 526 просмотров
Решения вопроса 1
Negezor
@Negezor
Senior Shaurma Developer

The 'polyfill' option has been removed. The @babel/runtime module now skips polyfilling by default.
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы