VovanR / react-multiselect-two-sides

React multiselect two sides component
https://vovanr.github.io/react-multiselect-two-sides
MIT License
15 stars 11 forks source link

Unexpected token (190:4) You may need an appropriate loader to handle #16

Closed lacajanegra closed 6 years ago

lacajanegra commented 6 years ago

I am trying to load, but i get this error:

ERROR in ./~/react-multiselect-two-sides/index.jsx
Module parse failed: C:\Users\amaru\ALQUIMIO\my-new-project\node_modules\react-multiselect-two-sides\index.jsx Unexpected token (161:3)
You may need an appropriate loader to handle this file type.

My webpack.config is:

 {
          test: /\.(js|jsx)$/,
          exclude: /node_modules/,
          use: {
            loader: 'babel-loader',
            options: {
              cacheDirectory: true,
              presets: ['es2015', 'react', 'env']
            }
          }
        },

my .babelrc

{
  "presets": [
    "react",
    "es2015",
    "stage-0",
    "env"
  ],
  "plugins": [
    ["transform-class-properties", { "spec": true }],
    ["transform-object-rest-spread"]
  ]
}

and my dependencies:

"devDependencies": {
    "babel-core": "^6.26.0",
    "babel-loader": "^7.1.2",
    "babel-plugin-transform-class-properties": "^6.24.1",
    "babel-plugin-transform-object-rest-spread": "^6.26.0",
    "babel-plugin-transform-react-jsx": "^6.24.1",
    "babel-preset-env": "^1.6.0",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-react": "^6.24.1",
    "babel-preset-stage-0": "^6.24.1",
    "copy-webpack-plugin": "^4.1.0",
    "css-hot-loader": "^1.3.1",
    "css-loader": "^0.28.7",
    "extract-text-webpack-plugin": "^3.0.0",
    "file-loader": "^0.11.2",
    "html-loader": "^0.5.1",
    "html-webpack-plugin": "^2.30.1",
    "node-sass": "^4.5.3",
    "rimraf": "^2.6.2",
    "sass-loader": "^6.0.6",
    "source-list-map": "^2.0.0",
    "style-loader": "^0.18.2",
    "uglify-js": "^3.1.3",
    "url-loader": "^0.5.9",
    "webpack": "^3.6.0",
    "webpack-dev-server": "^2.9.1"
  },
  "dependencies": {
    "axios": "^0.17.0",
    "bootstrap": "^4.0.0-beta",
    "chart.js": "2.7.0",
    "codemirror": "^5.30.0",
    "font-awesome": "^4.7.0",
    "history": "4.7.2",
    "is-url-external": "^1.0.3",
    "lodash": "^4.17.4",
    "react": "^15.6.2",
    "react-chartjs-2": "2.6.2",
    "react-codemirror2": "^2.0.2",
    "react-dom": "^15.6.2",
    "react-dropzone": "^4.2.1",
    "react-ladda": "5.0.7",
    "react-quill": "^1.1.0",
    "react-redux": "^5.0.6",
    "react-router-dom": "4.2.2",
    "react-select": "1.0.0-rc.10",
    "react-text-mask": "4.1.0",
    "react-transition-group": "^1.2.0",
    "reactstrap": "^4.8.0",
    "redux": "^3.7.2",
    "redux-thunk": "^2.2.0",
    "simple-line-icons": "^2.4.1",
    "spinkit": "^1.2.5"
  }

I am trying to use the componet like this: import MultiselectTwoSides from 'react-multiselect-two-sides';

Thank you

VovanR commented 6 years ago

@lacajanegra can you test development version VovanR/react-multiselect-two-sides#update\/update-dependencies

npm install VovanR/react-multiselect-two-sides#update\/update-dependencies
VovanR commented 6 years ago

I will update main if it works well

MindRave commented 6 years ago

@VovanR Seeing the same issue. Any updates on this?

VovanR commented 6 years ago

Fixed in 0.12.0

VovanR commented 6 years ago

@MindRave try new 0.12.0 version please