Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.20.0 Failed to compile - 'material-ui' does not contain an export named 'TableSortLabel' #9388

Closed
1 task done
mikeriley131 opened this issue Dec 4, 2017 · 21 comments
Closed
1 task done
Labels
bug 🐛 Something doesn't work

Comments

@mikeriley131
Copy link
Contributor

mikeriley131 commented Dec 4, 2017

  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

App should start without issue with MUI compiling properly.

Current Behavior

I get the following error after installing v0.20.0 and running npm start:

Failed to compile
./node_modules/@devexpress/dx-react-grid-material-ui/dist/dx-react-grid-material-ui.es.js
1071:4-18 'material-ui' does not contain an export named 'TableSortLabel'.

When l look in the node_modules folder, there is no TableSortLabel.js file in the Table folder. I do see it in the repo though (https://github.com/mui-org/material-ui/blob/v1-beta/src/Table/TableSortLabel.js).

Steps to Reproduce (for bugs)

  1. npm uninstall material-ui
  2. npm install material-ui@latest
  3. Start your app (npm start, yarn start, etc.)
  4. See the "Failed to Compile" error.

Context

Can not start app with lastest version of MUI.

Your Environment

Tech Version
Material-UI 0.20.0
React 15.6.1
browser all
etc
@mikeriley131 mikeriley131 changed the title v.0.20.0 Failed to compile - 'material-ui' does not contain an export named 'TableSortLabel' v0.20.0 Failed to compile - 'material-ui' does not contain an export named 'TableSortLabel' Dec 4, 2017
@mbrookes
Copy link
Member

mbrookes commented Dec 4, 2017

dx-react-grid-material-ui has a dependency on v1-beta, you're using v0.20.0.

@mbrookes mbrookes added component: table This is the name of the generic UI component, not the React module! external dependency Blocked by external dependency, we can’t do anything about it discussion labels Dec 4, 2017
@mikeriley131
Copy link
Contributor Author

Ah, right. Any idea why I'm seeing the component in the repo but not in the node_modules folder?

@mbrookes
Copy link
Member

mbrookes commented Dec 4, 2017

v1-beta is the default branch since that's the focus for new development, v0.20.0 is on the master branch.

@oliviertassinari oliviertassinari added v0.x bug 🐛 Something doesn't work and removed discussion external dependency Blocked by external dependency, we can’t do anything about it labels Dec 5, 2017
@oliviertassinari
Copy link
Member

oliviertassinari commented Dec 5, 2017

I have added the bug flag. The issue will be definitely solved once we use a different npm repository name for v1.

@oliviertassinari oliviertassinari added core and removed v0.x component: table This is the name of the generic UI component, not the React module! labels Dec 5, 2017
@oliviertassinari oliviertassinari added this to the v1.0.0-prerelease milestone Dec 5, 2017
@oliviertassinari
Copy link
Member

oliviertassinari commented Dec 9, 2017

@mui-org/core-contributors I think that we will better off hosting v1 under a different npm package name. Hosing all the packages under an organization will:

  • signal what's official and what's not.
  • prevent future name clashing
  • make the transition from v0.x to v1 much easier.
  • provide simpler ACL handling.

Here are two alternatives I'm considering. I don't think people have weighted their preference yet:

import { Button } from '@material-ui/core';
import Icons from'@material-ui/icons';
import DatePicker from '@material-ui/date-picker';
import { Button } from '@mui-org/material-ui';
import Icons from'@mui-org/material-ui-icons';
import DatePicker from '@mui-org/material-ui-date-picker';
// More idea?

@rosskevin
Copy link
Member

So we have the npm org material-ui just not the GitHub org correct?

@pelotom
Copy link
Member

pelotom commented Dec 9, 2017

Purely from a usability standpoint, I favor keeping it all under material-ui as it is now, because it's easy to remember and less typing. But maybe that's just me 🤷‍♂️

@oliviertassinari
Copy link
Member

oliviertassinari commented Dec 9, 2017

So we have the npm org material-ui

@rosskevin We have: https://www.npmjs.com/org/material-ui and https://www.npmjs.com/org/mui-org

@rosskevin
Copy link
Member

I like option 1 from a usage standpoint, but it will be confusing if the org and/or repo names don't match.

e.g. core package to material-ui repo?

It are we going to rename the repo as well?

@hai-cea
Copy link
Member

hai-cea commented Dec 9, 2017

We currently have https://www.npmjs.com/package/material-ui-next which some are using. I think it would be nice if we could keep the material-ui npm registry after v1 moves out of beta. Essentially, when the v1-beta branch becomes master.

@leMaik
Copy link
Member

leMaik commented Dec 9, 2017

@oliviertassinari I like option 1. 👍 It would be nice to have many material-ui related packages (more components) available at @material-ui/some-wild-component. I don't think that it will be confusing that thre orgs don't match. Actually, @mui-org/material-ui-some-wild-component is pretty redundant and long. It confuses me that this org is called mui-org instead of material-ui.

@hai-cea
Copy link
Member

hai-cea commented Dec 10, 2017

It confuses me that this org is called mui-org instead of material-ui.

@leMaik Yeh, I wish we could have gotten the material-ui organization name. But, unfortunately, it was taken.

@oliviertassinari
Copy link
Member

I also like option 1. better.

I think it would be nice if we could keep the material-ui npm registry after v1 moves out of beta. Essentially, when the v1-beta branch becomes master.

@hai-cea What about the 4 advantages of moving to an organization package name?

@oliviertassinari
Copy link
Member

oliviertassinari commented Dec 10, 2017

@hai-cea For instance, we will be able to revert #8473 by using a different npm repository name (-1933 LOCs). It's just the tip of the iceberg.

@hai-cea
Copy link
Member

hai-cea commented Dec 11, 2017

@oliviertassinari Yeh, I agree with what you're saying. I'm just thinking there's an advantage to material-ui going from v0.x to v1.0.0 on the same package. It would signal an official release and a big milestone for the project. At that point, support for v0.x can stop and the v1-beta branch becomes master and all the download stats will be intact.

I think it makes total sense what you're saying. I'm just wondering if we want to make the separate package temporary?

@hai-cea
Copy link
Member

hai-cea commented Dec 11, 2017

It would be nice to have many material-ui related packages (more components) available at @material-ui/some-wild-component.

An alternative to this would be to prefix all material-ui packages with mui.

  • mui-core
  • mui-icons
  • mui-date-picker

This is similar to React - https://github.com/facebook/react/tree/master/packages

@oliviertassinari
Copy link
Member

oliviertassinari commented Dec 11, 2017

I'm just wondering if we want to make the separate package temporary?

@hai-cea Does it mean you want to ask external lib authors to change the dependency from material-ui to material-ui-next while it's not stable, then asking them to move back to material-ui?
What if people are waiting for the stable release to start the migration?

It's really tricky as some external libs might be relying on [email protected] while others on [email protected]. In this situation people can't have both versions installed at the same time.
They only have one option. They do the migration in one go. In that case. I would rather not changing anything.

Regarding, signaling what's official or not, provide simpler ACL handling and prevent future name clashing. It won't be an issue if we keep the mono-package approach or don't host new packages.

@oliviertassinari
Copy link
Member

oliviertassinari commented Dec 11, 2017

Ok, as far as I'm concern. We can close this issue and defer the package name change to an ulterior moment. A point where we feel an better pain. This moment might never come. I have opened an issue to keep track of the 1993 LOCs #9469.

@hai-cea
Copy link
Member

hai-cea commented Dec 11, 2017

It's really tricky as some external libs might be relying on [email protected] while others on [email protected]. In this situation people can't have both versions installed at the same time.

@oliviertassinari Ah yeh, that's a really good point. I agree with you that keeping material-ui is problematic.

@oliviertassinari
Copy link
Member

@mui-org/core-contributors I don't think that we have reached a consensus. The current answer to the migration problem if you rely on external libraries is: "port everything in one go". I still think that @material-ui/core package naming offers good potential. Feel free to weight your point of view.

I'm closing the issue as I have been hijacking it. @mikeriley131 Sorry 😬 .
The README.md has been updated. The v0.x/v1.x should be clearer now:

capture d ecran 2017-12-15 a 23 52 58

@rosskevin
Copy link
Member

Strong +1 on @material-ui/core. Scalable namespace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work
Projects
None yet
Development

No branches or pull requests

7 participants