Ошибка сборки модуля в React: "Неизвестный плагин" @ babel / plugin-offer-decorators "при компиляции приложения React - PullRequest
0 голосов
/ 13 ноября 2018

Я собираю небольшое приложение React и пытаюсь включить MobX в зависимости.Ниже приведена настройка package.json для babel.

"babel": {
"presets": [
  "@babel/preset-env",
  "react-app"
],
"plugins": [
  [
    "@babel/plugin-proposal-decorators",
    {
      "legacy": true
    }
  ],
  [
    "@babel/plugin-proposal-class-properties",
    {
      "loose": true
    }
   ]
 ]
},
"devDependencies": {
"@babel/plugin-proposal-decorators": "^7.1.2",
"babel-plugin-transform-decorators-legacy": "^1.3.5"
}

Фактическая ошибка, которую я получаю при запуске сервера, следующая:

./src/index.js
Module build failed: ReferenceError: Unknown plugin "@babel/plugin-proposal- 
decorators" specified in 
"/Users/briankaty1/Desktop/mobx/aquastars/react_aquastars/package.json" at 0, 
attempted to resolve relative to 
"/Users/briankaty1/Desktop/mobx/aquastars/react_aquastars"

Любая помощь будет принята с благодарностью.

...