ui.mantine.dev icon indicating copy to clipboard operation
ui.mantine.dev copied to clipboard

module not found

Open amanzrx4 opened this issue 2 years ago • 6 comments

Hi, im trying to fork the repo and run it on my pc, im getting some issue like some modules are missing

> [email protected] dev
> next dev -p 7522

ready - started server on 0.0.0.0:7522, url: http://localhost:7522
error - ./node_modules/@mantine/core/esm/index.js:2:0
Module not found: Can't resolve './components/Transition/index.js'

Import trace for requested module:
./src/components/Layout/Layout.tsx
./src/pages/_app.tsx

https://nextjs.org/docs/messages/module-not-found
wait  - compiling /_error (client and server)...
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /home/aman/open-source/ui.mantine.dev/node_modules/fsevents isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /home/aman/open-source/ui.mantine.dev/node_modules/fsevents isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
error - ./node_modules/@mantine/core/esm/index.js:2:0
Module not found: Can't resolve './components/Transition/index.js'

Import trace for requested module:
./src/components/Layout/Layout.tsx
./src/pages/_app.tsx

https://nextjs.org/docs/messages/module-not-found
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /home/aman/open-source/ui.mantine.dev/node_modules/fsevents isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)

amanzrx4 avatar May 29 '22 14:05 amanzrx4

Why do you need to run it locally? We do not accept PRs in this repo unless they were requested by maintainers.

rtivital avatar May 29 '22 16:05 rtivital

I see, well actually i saw this weird behaviour on mantine website and ui.mantine as well, when i change the theme to dark and reload the page, the theme can be seen transitioning from light(or system default) to dark,so i thought of running it on my local machine to see where is the issue, and if it has to do with @mantine/core or hooks or ssr, at first i forked the main mantine repo but again getting some error so tried this one, I'm just starting out so looking for potential open source projects to learn from how thing work under the hood.

amanzrx4 avatar May 30 '22 06:05 amanzrx4

Color scheme flash on reload is expected, both docs and Mantine UI websites are static, they are prerendered with light color scheme.

rtivital avatar May 30 '22 07:05 rtivital

ok thanks, is there any way to change this behaviour like using cookies

amanzrx4 avatar May 30 '22 08:05 amanzrx4

https://mantine.dev/theming/dark-theme/#save-color-scheme-in-cookie

rtivital avatar May 30 '22 08:05 rtivital

link (as of today) https://mantine.dev/guides/dark-theme/#save-color-scheme-in-cookie

jgravois avatar Sep 08 '22 22:09 jgravois