react-styleguidist icon indicating copy to clipboard operation
react-styleguidist copied to clipboard

React Native example- The node type SpreadProperty has been renamed to SpreadElement

Open mcconkiee opened this issue 6 years ago • 5 comments

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

mcconkiee avatar Nov 14 '18 19:11 mcconkiee

Feel free to send a pull request with a fix 👾

sapegin avatar Nov 16 '18 07:11 sapegin

i'm having the same issue today when i try to run the demo

theeheng avatar Nov 16 '18 17:11 theeheng

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).

chrisbobbe avatar Mar 14 '19 16:03 chrisbobbe

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.

binodkalathil avatar Nov 18 '19 14:11 binodkalathil

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

devr77 avatar Apr 02 '23 06:04 devr77