material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

Example broken (peerDependencies requirements)

Open chadobado opened this issue 11 years ago • 15 comments

To reproduce:

git clone https://github.com/callemall/material-ui.git
cd material-ui
npm install
cd example
npm install

Error:

npm ERR! peerinvalid The package react does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants react@>=0.13
npm ERR! peerinvalid Peer [email protected] wants react@~0.13.x || ~0.12.x

chadobado avatar May 04 '15 21:05 chadobado

When updating package to request latest, npm install completes successfully.

npm start results in gulp looking for (what appear to be) js version of styles/themes. No app.js is compiled:

[14:21:07] gulp-notify: [Compile Error] Cannot find module '../../../src/js/styles/theme.js' from '/Users/Chad/Documents/Work/Modetwo/Site/material-ui/example/src/app'
[14:21:08] gulp-notify: [Compile Error] Cannot find module '../../../../src/js/svg-icons/svg-icon.jsx' from '/Users/Chad/Documents/Work/Modetwo/Site/material-ui/example/src/app/components'

chadobado avatar May 04 '15 21:05 chadobado

Tried patching all this manually but am getting a host of errors. Will wait for feedback before proceeding further... thanks in advance.

chadobado avatar May 04 '15 21:05 chadobado

same here

cad avatar May 11 '15 22:05 cad

use the last release: https://github.com/callemall/material-ui/releases/tag/v0.7.5

MAH1987 avatar May 12 '15 07:05 MAH1987

@MAH1987 even that release doesn't work

arhmnsh avatar May 14 '15 09:05 arhmnsh

I had this same error. Tried using the release 0.7.5 ( downloaded the zip ) and had the same error.

npm --version
2.7.5

I managed to fix things by changing the react dependency in package.json to "react": "^0.13.0" ( from 0.12 ).

gulp then worked. ( as well as npm start )

Should the react dependency be updated in the example package.json?

eadz avatar May 17 '15 00:05 eadz

Seems like they change their file structure and API a bit. I create a PR and find a problem I couldn't solve anymore. any further fix on it would be good.

hungtuchen avatar May 18 '15 05:05 hungtuchen

Hi everyone, I'm working on a fix for this issue. Aside from the old version of Material-UI it is using, I believe there may be a conflict with the versions of React being used between Material-UI and the example as @eadz stated. This has been resolved on a previous issue here.

Also, the example folder current uses the Material-UI v0.8.0 prerelease and thus will not work on v0.7.5.

mmrtnz avatar May 18 '15 19:05 mmrtnz

@mmrtnz I followed the instructions in your pr #652, however I get the error in the console " Uncaught TypeError: Cannot read property 'ThemeManager' of undefined" when running the example

eadz avatar May 20 '15 12:05 eadz

I'm having the same problem as @eadz. Does anyone know how to make the example work with any version?

@mmrtnz: thank you for your great work with the library! Looks really nice, and I can't wait to try it out properly.

juhoojala avatar May 20 '15 19:05 juhoojala

same problem with @eadz and @juhoojala

khairold avatar May 22 '15 03:05 khairold

@eadz It looks like I made a mistake on the file location to place the generated lib folder, it should be material-ui/example/node_modules/material-ui/lib/ rather than material-ui/example/node_modules/lib/, I'm sorry about that. Can you please let me know if that solves the issue?

mmrtnz avatar May 22 '15 03:05 mmrtnz

@mmrtnz Yes, of course. This fixes the issue. Thanks!

juhoojala avatar May 22 '15 06:05 juhoojala

@mmrtnz it works now, thanks

hungtuchen avatar May 22 '15 08:05 hungtuchen

Glad to hear it's now working :) I will be closing this issue in that case.

mmrtnz avatar May 22 '15 21:05 mmrtnz