hperrin / svelte-material-ui

Svelte Material UI Components
https://sveltematerialui.com/
Apache License 2.0
3.32k stars 284 forks source link

console warning when running the sample site. #448

Open msh2050 opened 2 years ago

msh2050 commented 2 years ago

Describe the bug running the sample site in package

tinygesture doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/top-app-bar/index.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/dom/index.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/drawer/index.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/icon-button/index.js" points to missing source files
Sourcemap for "/svelte-material-ui-master/packages/site/node_modules/@material/list/index.js" points to missing source files
Sourcemap for "/svelte-material-ui-master/packages/site/node_modules/@material/tooltip/index.js" points to missing source files
Sourcemap for "/svelte-material-ui-master/packages/site/node_modules/@material/top-app-bar/constants.js" points to missing source files
Sourcemap for "/svelte-material-ui-master/packages/site/node_modules/@material/top-app-bar/adapter.js" points to missing source files
Sourcemap for "/svelte-material-ui-master/packages/site/node_modules/@material/top-app-bar/foundation.js" points to missing source files
Sourcemap for "/svelte-material-ui-master/packages/site/node_modules/@material/top-app-bar/component.js" points to missing source files
Sourcemap for "/svelte-material-ui-master/packages/site/node_modules/@material/top-app-bar/fixed/foundation.js" points to missing source files
Sourcemap for "/svelte-material-ui-master/packages/site/node_modules/@material/top-app-bar/short/foundation.js" points to missing source files
Sourcemap for "/svelte-material-ui-master/packages/site/node_modules/@material/top-app-bar/standard/foundation.js" points to missing source files
Sourcemap for "/svelte-material-ui-master/packages/site/node_modules/@material/dom/events.js" points to missing source files
Sourcemap for "/svelte-material-ui-master/packages/site/node_modules/@material/dom/ponyfill.js" points to missing source files
Sourcemap for /svelte-material-ui-master/packages/site/node_modules/@material/dom/keyboard.js" points to missing source files
Sourcemap for "/svelte-material-ui-master/packages/site/node_modules/@material/dom/focus-trap.js" points to missing source files
Sourcemap for "d/svelte-material-ui-master/packages/site/node_modules/@material/drawer/adapter.js" points to missing source files
Sourcemap for "/svelte-material-ui-master/packages/site/node_modules/@material/drawer/util.js" points to missing source files
Sourcemap for "/svelte-material-ui-master/packages/site/node_modules/@material/drawer/constants.js" points to missing source files
Sourcemap for "svelte-material-ui-master/packages/site/node_modules/@material/drawer/component.js" points to missing source files
Sourcemap for "/svelte-material-ui-master/packages/site/node_modules/@material/drawer/modal/foundation.js" points to missing source files
Sourcemap for "/svelte-material-ui-master/packages/site/node_modules/@material/drawer/dismissible/foundation.js" points to missing source files
Sourcemap for "/svelte-material-ui-master/packages/site/node_modules/@material/icon-button/adapter.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/icon-button/types.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/icon-button/constants.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/icon-button/foundation.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/icon-button/component.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/list/adapter.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/list/types.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/list/constants.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/list/component.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/list/foundation.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/tooltip/adapter.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/tooltip/constants.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/tooltip/component.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/tooltip/foundation.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/base/foundation.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/base/component.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/ripple/component.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/ripple/index.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/list/events.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/list/typeahead.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/animation/util.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/animation/animationframe.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/ripple/foundation.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/ripple/util.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/ripple/constants.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/ripple/types.js" points to missing source files
Sourcemap for "*/svelte-material-ui-master/packages/site/node_modules/@material/ripple/adapter.js" points to missing source files

To Reproduce Steps to reproduce the behavior: 1- clone the repo 2- cd to site 3- run npm run prepare to build your CSS file, then you can run npm run dev to start

Expected behavior no such warning

Desktop (please complete the following information):

Additional context even it I flow the getting started in documentation to start from scratch I will get no source warnings. I found old issue mention this but I think it was solved

PvPrs commented 2 years ago

Been having the exact same issue with the tooltip component. however it also doesn't show the component working. not sure if thats the case for OP aswell.

tuckergordon commented 2 years ago

I am also running into this issue after switching from rollup to vite. Seems like a duplicate of #335. That issue is closed but I believe this is still a bug

tuckergordon commented 2 years ago

Here is a small reproducible example Stackblitz.

All I did was take the Vite svelte-ts template, run npm i -D @smui/button, and add some sample button code to App.svelte. As you can see, the warnings appear:

image

@hperrin do you think this issue will be fixed by an upgrade to @material v14? I didn't find any issue tickets in their repo that suggested this is on their radar... Appreciate any suggestions you have on this!

michal-kapala commented 2 years ago

I'm using SvelteKit (Vite v3.0.2) with @sveltejs/adapter-node ^1.0.0-next.83 and I've had this issue right after i re-installed @smui/data-table, the warnings appeared after navigating to the page with DataTable (only the first time). On the second app run Vite realized there are new dependencies (ignore the warning, it's node adapter-related): dep reload After the reload the issue disappeared.

k-dahl commented 2 years ago

I'm using Svelte 3.49.0 with vite 3.0.0, and this issue has been persistent, @smui never gets bundled, nor do any @material deps. The warnings about missing sourcemaps are there on first nav to anything using those components, and each individual file is requested separately for them (300+ requests for just @smui/button, for instance).

tuckergordon commented 2 years ago

Still seems to be an issue with SMUI 7.0.0-beta.0

cc-ww commented 1 year ago

too difficult stucking...

tuckergordon commented 1 year ago

As of @sveltejs/vite-plugin-svelte@1.3.0, the warnings no longer appear. Instead there is a much friendlier log output with information about the prebundling that occurred.

Given that this issue can be resolved by simply upgrading a minor version of that library, I believe this issue can be closed.

image