jlengstorf / learn-rollup

This is an example project to accompany a tutorial on using Rollup.
https://code.lengstorf.com/learn-rollup-js/
ISC License
191 stars 61 forks source link

Error: 'LinearProgress' is not exported by node_modules/material-ui/Progress/index.js #39

Closed zhangwei900808 closed 6 years ago

zhangwei900808 commented 6 years ago
// Rollup plugins
import babel from 'rollup-plugin-babel';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import replace from 'rollup-plugin-replace';
import uglify from 'rollup-plugin-uglify';
import postcss from 'rollup-plugin-postcss';

// PostCSS plugins
import simplevars from 'postcss-simple-vars';
import nested from 'postcss-nested';
import cssnext from 'postcss-cssnext';
import cssnano from 'cssnano';

export default {
  entry: 'src/containers/ReactCdPlayer.js',
  dest: 'lib/js/main.min.js',
  format: 'iife',
  sourceMap: 'inline',
  plugins: [
    postcss({
      plugins: [
        simplevars(),
        nested(),
        cssnext({ warnForDuplicates: false, }),
        cssnano(),
      ],
      extensions: [ '.css' ],
    }),
    resolve({
      jsnext: true,
      main: true,
      browser: true,
    }),
    commonjs(),
    babel({
      exclude: 'node_modules/**',
    }),
    replace({
      exclude: 'node_modules/**',
      ENV: JSON.stringify(process.env.NODE_ENV || 'development'),
    }),
    (process.env.NODE_ENV === 'production' && uglify()),
  ],
};
☁  react-cd-player [master] ⚡ yarn rollup-build
yarn rollup-build v0.24.5
$ rollup -c
🚨   Error: 'LinearProgress' is not exported by node_modules/material-ui/Progress/index.js
https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
src/containers/ReactCdPlayer.js (7:9)
5: import FastForward from 'material-ui-icons/FastForward';
6: import FastRewind from 'material-ui-icons/FastRewind';
7: import { LinearProgress } from 'material-ui/Progress';
            ^
8:
9: import Cd from '../components/Cd';

error Command failed with exit code 1.
jlengstorf commented 6 years ago

Hi, @zhangwei900808 — since this issue isn't related to the original tutorial, I'm going to close this issue.

I'd ask either on the material-ui repo (start here, probably) or on the official Rollup repo.

Good luck!

zhangwei900808 commented 6 years ago

OK,Thanks!