obipawan / react-native-dash

A super simple <Dash /> component for react-native to draw customisable dashed lines
176 stars 64 forks source link

failed to compile #24

Closed vadbut closed 5 years ago

vadbut commented 5 years ago

I have the following error when importing the module:

./node_modules/react-native-dash/Dash.js 21:3
Module parse failed: Unexpected token (21:3)
You may need an appropriate loader to handle this file type.
|   for (let i = 0; i < n; i++) {
|       dash.push(
>           <View
|               key={ i }
|               style={ [

What could be the problem?

obipawan commented 5 years ago

hey @vadbut thanks for reporting. Could you share your package.json containing the dependency?

vadbut commented 5 years ago

{ "name": "with-react-native-web", "scripts": { "dev": "node server.js", "build": "next build", "start": "NODE_ENV=production node server.js" }, "dependencies": { "@zeit/next-css": "^1.0.1", "apollo-cache-inmemory": "^1.4.2", "apollo-client": "^2.4.12", "apollo-link-context": "^1.0.17", "apollo-link-http": "^1.5.11", "babel-plugin-module-resolver": "^3.1.2", "express": "^4.16.4", "filestack-js": "^2.0.7", "firebase": "^5.9.4", "graphql": "^14.1.1", "graphql-tag": "^2.10.1", "isomorphic-unfetch": "^3.0.0", "mobx": "^5.9.4", "mobx-react": "^5.4.3", "moment": "^2.24.0", "next": "latest", "next-images": "^1.0.4", "radium": "^0.25.1", "react": "^16.7.0", "react-apollo": "^2.4.1", "react-art": "^16.5.2", "react-datepicker": "^2.5.0", "react-dom": "^16.7.0", "react-editext": "^3.2.1", "react-ga": "^2.5.7", "react-hint": "^3.2.0", "react-modal": "^3.8.1", "react-native-dash": "^0.0.9", "react-native-measureme": "^0.0.1", "react-native-web": "^0.10.", "sitemap": "^2.1.0", "slugify": "^1.3.4", "targets-webpack-plugin": "^2.0." }, "devDependencies": { "@babel/plugin-proposal-class-properties": "^7.1.0", "@babel/plugin-proposal-decorators": "^7.1.0" } }

slushman commented 5 years ago

What's needed for this to work with React Native web?

obipawan commented 5 years ago

@slushman @vadbut This should be fixed with v0.0.11. Feel free to reopen if you find any issues.