4

So I've started a new react-native project and copied over the .babelrc file from my previous project. I've installed the necessary plugins but I'm getting the error

Unknown plugin transform-decorators-legacy specified in .babelrc, attempted to resolve relative to "/mypath/project"

I've checked the node_modules in the path and see that the plugin was installed using yarn add. I'm also getting similar errors with my eslint plugins. Am I missing something in my project setup to have babel and eslint see the node_modules?

Is it perhaps caused by installing react-native-code-push? I think it had some errors when I installed codepush where it duplicated the react pod in the pod install - and so I removed it from the podfile. Is it trying to use a cached code-push js even though I don't have code push implemented in my react js files?

MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460

3 Answers3

0

trasnform-decorators-legacy

You have a typo here.

Dauren Akilbekov
  • 4,627
  • 2
  • 27
  • 32
0

try this :

yarn add babel-plugin-transform-decorators-legacy -g
0

for NPM :

npm install --save babel-plugin-transform-decorators-legacy

Oliver Watkins
  • 12,575
  • 33
  • 119
  • 225