react-styleguidist
react-styleguidist copied to clipboard
React Native example- The node type SpreadProperty has been renamed to SpreadElement
Current behavior when running the demo for react-native i get the following several times over
Trace: The node type SpreadProperty has been renamed to SpreadElement
at Object.isSpreadProperty (/Users/ericmcconkie/Downloads/react-styleguidist-7.3.11/examples/react-native/node_modules/@babel/types/lib/validators/generated/index.js:4192:11)
at hasSpread (/Users/ericmcconkie/Downloads/react-styleguidist-7.3.11/examples/react-native/node_modules/babel-plugin-transform-object-rest-spread/lib/index.js:38:13)
at PluginPass.ObjectExpression (/Users/ericmcconkie/Downloads/react-styleguidist-7.3.11/examples/react-native/node_modules/babel-plugin-transform-object-rest-spread/lib/index.js:234:14)
at newFn (/Users/ericmcconkie/Downloads/react-styleguidist-7.3.11/examples/react-native/node_modules/@babel/traverse/lib/visitors.js:193:21)
at NodePath._call (/Users/ericmcconkie/Downloads/react-styleguidist-7.3.11/examples/react-native/node_modules/@babel/traverse/lib/path/context.js:53:20)
at NodePath.call (/Users/ericmcconkie/Downloads/react-styleguidist-7.3.11/examples/react-native/node_modules/@babel/traverse/lib/path/context.js:40:17)
at NodePath.visit (/Users/ericmcconkie/Downloads/react-styleguidist-7.3.11/examples/react-native/node_modules/@babel/traverse/lib/path/context.js:88:12)
at TraversalContext.visitQueue (/Users/ericmcconkie/Downloads/react-styleguidist-7.3.11/examples/react-native/node_modules/@babel/traverse/lib/context.js:118:16)
at TraversalContext.visitSingle (/Users/ericmcconkie/Downloads/react-styleguidist-7.3.11/examples/react-native/node_modules/@babel/traverse/lib/context.js:90:19)
at TraversalContext.visit (/Users/ericmcconkie/Downloads/react-styleguidist-7.3.11/examples/react-native/node_modules/@babel/traverse/lib/context.js:146:19)
at Function.traverse.node (/Users/ericmcconkie/Downloads/react-styleguidist-7.3.11/examples/react-native/node_modules/@babel/traverse/lib/index.js:94:17)
at NodePath.visit (/Users/ericmcconkie/Downloads/react-styleguidist-7.3.11/examples/react-native/node_modules/@babel/traverse/lib/path/context.js:95:18)
at TraversalContext.visitQueue (/Users/ericmcconkie/Downloads/react-styleguidist-7.3.11/examples/react-native/node_modules/@babel/traverse/lib/context.js:118:16)
at TraversalContext.visitMultiple (/Users/ericmcconkie/Downloads/react-styleguidist-7.3.11/examples/react-native/node_modules/@babel/traverse/lib/context.js:85:17)
at TraversalContext.visit (/Users/ericmcconkie/Downloads/react-styleguidist-7.3.11/examples/react-native/node_modules/@babel/traverse/lib/context.js:144:19)
at Function.traverse.node (/Users/ericmcconkie/Downloads/react-styleguidist-7.3.11/examples/react-native/node_modules/@babel/traverse/lib/index.js:94:17)
To reproduce clone the repo for react native, per the ReadMe
git clone https://github.com/styleguidist/react-styleguidist.git
cd react-styleguidist/examples/react-native
npm install
then run the server:
npx styleguidist server
Expected behavior see the demo in working order
Feel free to send a pull request with a fix 👾
i'm having the same issue today when i try to run the demo
I've encountered this problem when using /babel-plugin-transform-object-rest-spread (an older version of @babel/plugin-proposal-object-rest-spread), which is required by babel-preset-react-native.
I was able to fix it by removing react-native
from my babel presets and adding the plugin "@babel/plugin-proposal-object-rest-spread". Without the react-native preset, you may need "@babel/preset-react" (I added it but I'm only guessing that it's necessary).
you may need "@babel/preset-react" (I added it but I'm only guessing that it's necessary).
@chrisbobbe that is not necessary. I confirmed it.
git clone https://github.com/styleguidist/react-styleguidist.git cd react-styleguidist/examples/react-native npm install
It is working Fine, I have checked This morning