Skip to content

Instantly share code, notes, and snippets.

@pdc
Created February 26, 2016 16:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pdc/b06fdcd064cb60cd12e4 to your computer and use it in GitHub Desktop.
Save pdc/b06fdcd064cb60cd12e4 to your computer and use it in GitHub Desktop.
Git-based dependency on Material UI doesn’t auto-build
> material-ui-example-webpack@0.14.4 build /ssd/workspaces/webpack-example
> webpack --config webpack-production.config.js --progress --colors
Hash: 80afde4fdbabcf757e1f
Version: webpack 1.12.14
Time: 3023ms
[0] multi main 28 bytes {0} [built]
+ 165 hidden modules
ERROR in ./src/app/Main.jsx
Module not found: Error: Cannot resolve module 'material-ui/lib/raised-button' in /ssd/workspaces/webpack-example/src/app
@ ./src/app/Main.jsx 13:20-60
ERROR in ./src/app/Main.jsx
Module not found: Error: Cannot resolve module 'material-ui/lib/dialog' in /ssd/workspaces/webpack-example/src/app
@ ./src/app/Main.jsx 17:14-47
ERROR in ./src/app/Main.jsx
Module not found: Error: Cannot resolve module 'material-ui/lib/styles/colors' in /ssd/workspaces/webpack-example/src/app
@ ./src/app/Main.jsx 21:14-54
ERROR in ./src/app/Main.jsx
Module not found: Error: Cannot resolve module 'material-ui/lib/flat-button' in /ssd/workspaces/webpack-example/src/app
@ ./src/app/Main.jsx 23:18-56
ERROR in ./src/app/Main.jsx
Module not found: Error: Cannot resolve module 'material-ui/lib/styles/getMuiTheme' in /ssd/workspaces/webpack-example/src/app
@ ./src/app/Main.jsx 27:19-64
ERROR in ./src/app/Main.jsx
Module not found: Error: Cannot resolve module 'material-ui/lib/MuiThemeProvider' in /ssd/workspaces/webpack-example/src/app
@ ./src/app/Main.jsx 31:24-67

First, find a project that uses Material UI.

git clone https://github.com/callemall/material-ui.git
cp -R material-ui/examples/webpack-example .
cd webpack-example

Now install the GitHub version of Material UI.

npm install react react-dom react-tap-event-plugin
npm install github:callemall/material-ui#25dcaa4 --save

The output of the second command is in install.log. This shows the installaton of dependencies but no build messages.

Then we should be able to build with

npm install
npm run build

But I get the errors shown in build.log. This basically boils down to there being no lib directory.

material-ui-example-webpack@0.14.4 /ssd/workspaces/webpack-example
`-- material-ui@0.14.4 (git://github.com/callemall/material-ui.git#25dcaa4d53c70169b18aac01542179b6c3df84f0)
+-- inline-style-prefixer@0.6.7
| `-- bowser@1.0.0
+-- keycode@2.1.0
+-- lodash.flowright@3.2.1
+-- lodash.merge@4.3.1
| +-- lodash._baseclone@4.5.1
| +-- lodash._stack@4.1.0
| +-- lodash.isplainobject@4.0.3
| +-- lodash.keysin@4.1.2
| `-- lodash.rest@4.0.1
+-- lodash.throttle@4.0.1
| `-- lodash.debounce@4.0.3
+-- react-addons-create-fragment@0.14.7
+-- react-addons-pure-render-mixin@0.14.7
+-- react-addons-transition-group@0.14.7
+-- react-addons-update@0.14.7
+-- react-event-listener@0.1.1
+-- recompose@0.15.0
| +-- hoist-non-react-statics@1.0.5
| `-- lodash@4.5.1
+-- simple-assign@0.1.0
`-- warning@2.1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment