bamlab / bamlab/generator-rn-toolbox
Advanced Base Does Not Work
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I am trying to use advanced-base, but it totally breaks my app.
To reproduce:
1. create a react app.
```
react-native init my-app
```
2. Run advanced base generator
```
yo rn-toolbox:advanced-base
```
(say yes to all overwrite questions)
3. Start app locally
```
react-native run-ios
```
Result- app crashes with this output:
> error: bundling failed: Error: Plugin/Preset files are not allowed to export objects, only functions. In /Users/jim/Git-Projects/React-Native-With-A-Friend/WithFriend2/node_modules/babel-preset-react-native/index.js
at createDescriptor (/Users/jim/Git-Projects/React-Native-With-A-Friend/WithFriend2/node_modules/@babel/core/lib/config/config-descriptors.js:178:11)
at items.map (/Users/jim/Git-Projects/React-Native-With-A-Friend/WithFriend2/node_modules/@babel/core/lib/config/config-descriptors.js:109:50)
at Array.map ()
at createDescriptors (/Users/jim/Git-Projects/React-Native-With-A-Friend/WithFriend2/node_modules/@babel/core/lib/config/config-descriptors.js:109:29)
at createPresetDescriptors (/Users/jim/Git-Projects/React-Native-With-A-Friend/WithFriend2/node_modules/@babel/core/lib/config/config-descriptors.js:101:10)
at presets (/Users/jim/Git-Projects/React-Native-With-A-Friend/WithFriend2/node_modules/@babel/core/lib/config/config-descriptors.js:47:19)
at mergeChainOpts (/Users/jim/Git-Projects/React-Native-With-A-Friend/WithFriend2/node_modules/@babel/core/lib/config/config-chain.js:320:26)
at /Users/jim/Git-Projects/React-Native-With-A-Friend/WithFriend2/node_modules/@babel/core/lib/config/config-chain.js:283:7
at buildRootChain (/Users/jim/Git-Projects/React-Native-With-A-Friend/WithFriend2/node_modules/@babel/core/lib/config/config-chain.js:120:22)
I am using:
node v10.16.0
react - 16.8.6
rn-toolbox - 3.1.0
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with `react-native init`, `yo rn-toolbox:advanced-base`, and `react-native run-ios`. Start with the generated Babel setup and the reported `node_modules/babel-preset-react-native/index.js` and `@babel/core` stack; done means the generated app bundles and launches without the preset export error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, react-native
- Domain
- mobile, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100