Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Tooltip fails to work with Material UI / Typescript / Next / Custom Server #172

Closed
tashburn opened this issue May 23, 2018 · 12 comments
Closed

Comments

@tashburn
Copy link

tashburn commented May 23, 2018

Expected Behavior

Tooltips work.

Current Behavior

When trying to use the Material UI 1.0.0 Tooltip with Next and Typescript, and visit localhost:3000 with a browser, the following error happens in the console:

This dependency was not found:

* popper.js in ./node_modules/react-popper/lib/Popper.js

To install it, you can run: npm install --save popper.js

And the following error happens in the browser:

Error in ./Popper
Module not found: Error: [CaseSensitivePathsPlugin] `/Users/trent/home/projects/Grok/tmp/issue-tooltip/node_modules/react-popper/lib/popper.js` does not match the corresponding path on disk `Popper.js`.
ModuleNotFoundError: Module not found: Error: [CaseSensitivePathsPlugin] `/Users/trent/home/projects/Grok/tmp/issue-tooltip/node_modules/react-popper/lib/popper.js` does not match the corresponding path on disk `Popper.js`.
    at factoryCallback (/Users/trent/home/projects/Grok/tmp/issue-tooltip/node_modules/webpack/lib/Compilation.js:276:40)
    at factory (/Users/trent/home/projects/Grok/tmp/issue-tooltip/node_modules/webpack/lib/NormalModuleFactory.js:235:20)
    at applyPluginsAsyncWaterfall (/Users/trent/home/projects/Grok/tmp/issue-tooltip/node_modules/webpack/lib/NormalModuleFactory.js:70:21)
    at /Users/trent/home/projects/Grok/tmp/issue-tooltip/node_modules/tapable/lib/Tapable.js:265:18
    at that.fileExistsWithCase (/Users/trent/home/projects/Grok/tmp/issue-tooltip/node_modules/case-sensitive-paths-webpack-plugin/index.js:156:15)
    at that.getFilenamesInDir (/Users/trent/home/projects/Grok/tmp/issue-tooltip/node_modules/case-sensitive-paths-webpack-plugin/index.js:97:7)
    at fs.readdir (/Users/trent/home/projects/Grok/tmp/issue-tooltip/node_modules/case-sensitive-paths-webpack-plugin/index.js:63:5)
    at /Users/trent/home/projects/Grok/tmp/issue-tooltip/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:70:14
    at process._tickCallback (internal/process/next_tick.js:112:11)

If I try yarn add popper.js, the following warning is produced and the errors above remain --

warning Pattern ["[email protected]"] is trying to unpack in the same destination "/Users/trent/Library/Caches/Yarn/v1/npm-popper.js-1.14.3-1438f98d046acf7b4d78cd502bf418ac64d4f095" as pattern ["popper.js@^1.14.1"]. This could result in non-deterministic behavior, skipping.

Context

This is blocking my project.

Steps To Reproduce

  1. git clone [email protected]:tashburn/issue-tooltip.git
  2. cd issue-tooltip
  3. yarn install
  4. yarn dev
  5. open localhost:3000 in browser

Environment

macOS (latest)
Chrome (latest)
custom server (express)
[email protected]
[email protected]
@material-ui/[email protected]

@oliviertassinari
Copy link
Contributor

@tashburn I'm in the process of upgrading Material-UI to react-popper@1. Let's see if this fix the problem.

@tashburn
Copy link
Author

@oliviertassinari Fabulous. If you let me know when it's out, I'll test it with my sample repo.

@oliviertassinari
Copy link
Contributor

mui/material-ui#11862

@FezVrasta
Copy link
Member

@oliviertassinari does this fix the OP problem?

@oliviertassinari
Copy link
Contributor

I don't know.

@tashburn
Copy link
Author

@FezVrasta I can check once the new material-ui version is obtainable via yarn.

@FezVrasta
Copy link
Member

@tashburn any updates?

@oliviertassinari
Copy link
Contributor

@tashburn I plan on revamping the tooltip implementation this weekend on Material-UI side. It's a mess right now. I will most likely use popper.js directly.

@FezVrasta
Copy link
Member

I'd rather get help here to make react-popper work in your case, but it's up to you 😢

@tashburn
Copy link
Author

@oliviertassinari Thanks for the update. I just checked to see if the new @material-ui/core version 1.3 fixed this tooltip issue I had with version 1.2 (same issue).

@oliviertassinari
Copy link
Contributor

oliviertassinari commented Jun 28, 2018

@FezVrasta Don't worry, the motivation for using popper.js directly is around the problems react popper solves. Digging into the react-popper implementation, I see an opportunity to make the Material-UI tooltip implementation simpler & more lightweight. It might not execute. I will see how that goes.

@FezVrasta
Copy link
Member

I'm going to close this for inactivity, I suppose the problem has been fixed already. If not please reply here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants