5

I am putting together a small React App and trying to incorporate MobX into the dependencies. Below is the package.json setup for 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"
}

The actual error I get when I start the server is the following:

./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"

Any help would be greatly appreciated.

AltBrian
  • 2,392
  • 9
  • 29
  • 58

0 Answers0