-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
Multiple modules with names that only differ in casing in Popper module. #14711
Comments
@iohl What version of Material-UI are you using? The unpkg archive looks clean: https://unpkg.com/@material-ui/[email protected]/Popper/. Any idea how we can reproduce the problem? |
I think it's a duplicate of #11281. So we can close this issue. |
I am having this problem with@material-ui/core": "^4.0.0-beta.2" and webpack 4.31.0.
|
@hatton How can we reproduce it? |
Olivier thanks for looking into this.
Well, if it is somehow related to having a large-ish bundle sizes as IoHL seemed to imply, you could build the project I'm working on. I have tested this only on windows, but with both Cmd and Bash shells.
(requires node 10.15.3)
|
I can't reproduce it on PowerShell or GitBash. (Windows 10) |
Edit: Sorry, getting sloppy... I need to come back to this next week. |
I have exactly the same.
The problem exists on OSes for which file names are case insensitive like macos. |
This should fix this one: mui#14711
Still seeing the issue after rm -rf node_modules/@material-ui/core and
OS: mac |
What I basically did wa,s we have create-react-app where we've exported the configuration. I installed:
I attempted to get Material UI working on Storybook with multiple themes, and a theme provider with a dynamic switcher, according to this article: https://medium.com/encode/setting-up-storybook-with-material-ui-and-styled-components-5bdacb6db866 I cannot get the storybook stories to print. It's a separate issues. But if I install
|
For those who still has this issue, what i did back then as a work around and still work until now in my project was simply replace the source code import line of popper.js with absolute path to the library file. I use webpack and here's the config: return {
...,
module: {
rules: [
{
test: /node_modules\/@material-ui\/core\/esm\/Popper\/Popper\.js$/,
use: {
loader: 'string-replace-loader',
options: {
search: 'import PopperJS from \'popper.js\';',
replace: 'import PopperJS from "../../../../popper.js/dist/esm/popper";'
}
}
}
]
},
...
} I believe this is, as @mayacode mentioned, an OSes problem so do what you must to get material-ui library on your machine to find and load correctly this popper.js library in order for your code to be built successfully. |
hi module.exports = {
stories: ['../src/**/*.stories.tsx'],
addons: [
'@storybook/preset-create-react-app',
'@storybook/addon-actions',
'@storybook/addon-links',
],
webpackFinal: async (config, {configType}) => {
config.module.rules.push({
test: /node_modules\/@material-ui\/core\/esm\/Popper\/Popper\.js$/,
use: {
loader: 'string-replace-loader',
options: {
search: 'import PopperJS from \'popper.js\';',
replace: 'import PopperJS from "../../../../popper.js/dist/esm/popper";'
}
}
});
return config;
}
}; Unfortunately this does nothing and I still get the same error using Material-Table |
Hey guys just commenting to let you know that, I'm still facing this issue |
The solution provided by @iohl works but you might need to specify a different separator. This worked for me. |
Still relevant in 2021..
|
Hello, I am also facing this in 4.12.3. Any idea when permanent fix will be provided ? |
@poojaSingh18 It should already be fixed in v5. |
In
material-ui/Popper.js
, maybe considering using a different approach on importing thepopper.js
to Popper component. My webpack compiler reports it as follow:Solution
A temporally fix for this issue is to use either an absolute or relative path that point directly topopper.js
file when require the library.See #14711 (comment)
The text was updated successfully, but these errors were encountered: