TransformError Using removed Babel 5 option when I import Provider
See original GitHub issueHello -
I looked through the issues and I do not see this a reference to this.
I have 2 projects with the exact same package dependencies with the exception of one being a react web app the the other being react native. I just started the native app with the following package.json dependencies:
"dependencies": {
"moment": "2.12.0",
"react": "^0.14.8",
"react-native": "^0.23.0",
"react-redux": "4.4.1",
"redux": "3.0.0",
"redux-multi": "0.1.12",
"redux-thunk": "1.0.3"
},
"devDependencies": {
"babel-core": "6.3.26",
"babel-preset-es2015": "6.5.0",
"babel-preset-react": "6.5.0",
"babel-preset-stage-0": "6.5.0",
"babel-preset-stage-1": "6.5.0",
"eslint": "2.3.0",
"eslint-config-standard": "5.1.0",
"eslint-plugin-promise": "1.1.0",
"eslint-plugin-react": "4.1.0",
"eslint-plugin-standard": "1.3.2"
}
The app works fine until I try to import the Provider into my root node:
import { Provider } from 'react-redux'
The app then throws an error on the iOS simulator just from importing Provider and not even using it. I am using the iPhone 5 on v 9.3
TransformError:
/native/node_modules/redux/lib/index.js: [BABEL]
/native/node_modules/redux/lib/index.js: Using removed Babel 5 option:
/native/node_modules/redux/.babelrc.stage
- Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets
Here is my .babelrc as I have seen
{
"presets": ["es2015", "stage-0", "stage-1", "react"]
}
I have verified that I only have one instance of react installed. I have pruned my node_modules. I am really not sure where to go next with this issue and would love all any help that can be provided.
Thanks,
Jordan
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Well, as a first observation: you only need a single “stage” preset. The lower numbered presets include the higher stages as well.
Ok so I used a different package for babel and now it seems to be working. Here is my current config:
package.json
.babelrc
Thanks for stepping through this with me.
Jordan