roylee0704 / react-flexbox-grid

A set of React components implementing flexboxgrid with the power of CSS Modules.
http://roylee0704.github.io/react-flexbox-grid/
2.93k stars 206 forks source link

Couldn't find preset "es2015-loose" #108

Closed amelzer closed 7 years ago

amelzer commented 7 years ago

I was trying to integrate react-flexbox-grid with webpack2 and I am getting the following error:

ERROR in ./~/react-flexbox-grid/lib/index.js
Module build failed: Error: Couldn't find preset "es2015-loose" relative to directory "/Users/amelzer/Projects/Orderbird/falcon-webclient/node_modules/react-flexbox-grid"

This is my webpack.config

var path = require("path");

module.exports = {
  entry: {
    pos: './src/web-client-pos/index.js',
    report: './src/web-client-report/index.js'
  },
  module: {
    rules: [
          {
            test: /\.jsx?$/, //matches js and jsx
            use: ['babel-loader'],
            exclude: '/node_modules/'
          },
          {
            test: /\.css$/,
            include: /flexboxgrid/,
            use: [
              'style-loader',
              'css-loader'
            ]
          }
        ]
  },
  devtool: 'source-map', //provide source maps for browser's dev tools
  output: {
    path: path.join(__dirname, "public/js"), //where to put the build results
    publicPath: '/', //url where the browser will find the build results
    filename: "[name].bundle.js",//name for the JS bundle
  },
  devServer: {
    contentBase: './public/', //from where to deliver files
    port: 8000, //port to listen on
    hot: true,
    quiet: false,
    noInfo: false,
    lazy: false
  },
  stats: {
    colors: true
  }
};

React-Flexbox-Grid version: "react-flexbox-grid": "^1.0.2"

Any idea what is going on here?

roylee0704 commented 7 years ago

PR https://github.com/roylee0704/react-flexbox-grid/pull/111 should resolve the issue.

roylee0704 commented 7 years ago

close until this issue is reported.