Closed lcdss closed 3 years ago
Can't import import { experimentalStyled as styled } from '@material-ui/core/styles' on vite >=v2.2.0.
import { experimentalStyled as styled } from '@material-ui/core/styles'
/** "@emotion/react": "^11.1.5", "@emotion/styled": "^11.3.0", "@material-ui/core": "5.0.0-alpha.30", */ import React, { StrictMode } from "react"; import { render } from "react-dom"; import { experimentalStyled as styled } from "@material-ui/core/styles"; const LogoRoot = styled("svg")(); const Logo = () => ( <LogoRoot version="1.1" viewBox="0 0 512 512" > <path d="M0 85.333h512V426.67H0z" fill="#f0f0f0"/><path d="M288 85.33h-64v138.666H0v64h224v138.666h64V287.996h224v-64H288z" fill="#d80027"/><path d="M393.785 315.358L512 381.034v-65.676zm-82.133 0L512 426.662v-31.474l-143.693-79.83zm146.982 111.304l-146.982-81.664v81.664z" fill="#0052b4"/><path d="M311.652 315.358L512 426.662v-31.474l-143.693-79.83z" fill="#f0f0f0"/><path d="M311.652 315.358L512 426.662v-31.474l-143.693-79.83z" fill="#d80027"/><path d="M90.341 315.356L0 365.546v-50.19zm110.007 14.154v97.151H25.491z" fill="#0052b4"/><path d="M143.693 315.358L0 395.188v31.474h0l200.348-111.304z" fill="#d80027"/><path d="M118.215 196.634L0 130.958v65.676zm82.133 0L0 85.33v31.474l143.693 79.83zM53.366 85.33l146.982 81.664V85.33z" fill="#0052b4"/><path d="M200.348 196.634L0 85.33v31.474l143.693 79.83z" fill="#f0f0f0"/><path d="M200.348 196.634L0 85.33v31.474l143.693 79.83z" fill="#d80027"/><path d="M421.659 196.636L512 146.446v50.19zm-110.007-14.154V85.331h174.857z" fill="#0052b4"/><path d="M368.307 196.634L512 116.804V85.33h0L311.652 196.634z" fill="#d80027"/> </LogoRoot> ); render( <StrictMode> <Logo /> </StrictMode>, document.querySelector("#root") );
Output of npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers:
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
System: OS: Linux 5.11 Arch Linux CPU: (4) x64 Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz Memory: 1.81 GB / 15.56 GB Container: Yes Shell: 5.8 - /usr/bin/zsh Binaries: Node: 14.15.0 - ~/.asdf/installs/nodejs/14.15.0/bin/node Yarn: 1.22.10 - ~/.asdf/installs/nodejs/14.15.0/.npm/bin/yarn npm: 7.8.0 - ~/.asdf/installs/nodejs/14.15.0/.npm/bin/npm Browsers: Chromium: 90.0.4430.72 npmPackages: vite: ^2.2.0 => 2.2.0
Used package manager: npm
vite:config bundled config file loaded in 73ms +0ms [dotenv][DEBUG] did not match key and value when parsing line 8: [dotenv][DEBUG] did not match key and value when parsing line 3: [dotenv][DEBUG] did not match key and value when parsing line 8: [dotenv][DEBUG] did not match key and value when parsing line 11: [dotenv][DEBUG] did not match key and value when parsing line 12: ########## [dotenv][DEBUG] did not match key and value when parsing line 13: # Client # [dotenv][DEBUG] did not match key and value when parsing line 14: ########## [dotenv][DEBUG] did not match key and value when parsing line 17: vite:config using resolved config: { vite:config plugins: [ vite:config 'vite:pre-alias', vite:config 'alias', vite:config 'react-refresh', vite:config 'vite:dynamic-import-polyfill', vite:config 'vite:resolve', vite:config 'vite:html', vite:config 'vite:css', vite:config 'vite:esbuild', vite:config 'vite:json', vite:config 'vite:wasm', vite:config 'vite:worker', vite:config 'vite:asset', vite:config 'vite:define', vite:config 'vite:css-post', vite:config 'vite:client-inject', vite:config 'vite:import-analysis' vite:config ], vite:config resolve: { dedupe: undefined, alias: [ [Object], [Object] ] }, vite:config server: {}, vite:config configFile: '/home/lcss/my-project/vite.config.js', vite:config configFileDependencies: [ 'vite.config.js' ], vite:config inlineConfig: { vite:config root: undefined, vite:config base: undefined, vite:config mode: undefined, vite:config configFile: undefined, vite:config logLevel: undefined, vite:config clearScreen: undefined, vite:config server: {} vite:config }, vite:config root: '/home/lcss/my-project', vite:config base: '/', vite:config publicDir: '/home/lcss/my-project/public', vite:config cacheDir: '/home/lcss/my-project/node_modules/.vite', vite:config command: 'serve', vite:config mode: 'development', vite:config isProduction: false, vite:config build: { vite:config target: [ 'es2019', 'edge18', 'firefox60', 'chrome61', 'safari11' ], vite:config polyfillDynamicImport: true, vite:config outDir: 'dist', vite:config assetsDir: 'assets', vite:config assetsInlineLimit: 4096, vite:config cssCodeSplit: true, vite:config sourcemap: false, vite:config rollupOptions: {}, vite:config commonjsOptions: { include: [Array], extensions: [Array] }, vite:config minify: 'terser', vite:config terserOptions: {}, vite:config cleanCssOptions: {}, vite:config write: true, vite:config emptyOutDir: null, vite:config manifest: false, vite:config lib: false, vite:config ssr: false, vite:config ssrManifest: false, vite:config brotliSize: true, vite:config chunkSizeWarningLimit: 500, vite:config watch: null vite:config }, vite:config env: vite:config BASE_URL: '/', vite:config MODE: 'development', vite:config DEV: true, vite:config PROD: false vite:config }, vite:config assetsInclude: [Function: assetsInclude], vite:config logger: { vite:config hasWarned: false, vite:config info: [Function: info], vite:config warn: [Function: warn], vite:config error: [Function: error], vite:config clearScreen: [Function: clearScreen] vite:config }, vite:config createResolver: [Function: createResolver] vite:config } +6ms vite:deps Crawling dependencies using entries: vite:deps /home/lcss/my-project/index.html +0ms vite:resolve 0ms /src/main.jsx -> /home/lcss/my-project/src/main.jsx +0ms vite:resolve 4ms nprogress/nprogress.css -> /home/lcss/my-project/node_modules/nprogress/nprogress.css +16ms vite:resolve 2ms react -> /home/lcss/my-project/node_modules/react/index.js +8ms vite:resolve 0ms react-dom -> /home/lcss/my-project/node_modules/react-dom/index.js +1ms vite:resolve 0ms react-helmet-async -> /home/lcss/my-project/node_modules/react-helmet-async/lib/index.module.js +2ms vite:resolve 1ms react-router-dom -> /home/lcss/my-project/node_modules/react-router-dom/index.js +2ms vite:resolve 0ms ./app -> /home/lcss/my-project/src/app.jsx +4ms vite:resolve 0ms ./contexts/auth-context -> /home/lcss/my-project/src/contexts/auth-context.jsx +9ms vite:resolve 0ms ./i18n -> /home/lcss/my-project/src/i18n.js +2ms vite:resolve 1ms prop-types -> /home/lcss/my-project/node_modules/prop-types/index.js +3ms vite:resolve 1ms @material-ui/core -> /home/lcss/my-project/node_modules/@material-ui/core/index.js +2ms vite:resolve 1ms history/browser -> /home/lcss/my-project/node_modules/history/browser.js +0ms vite:resolve 1ms notistack -> /home/lcss/my-project/node_modules/notistack/dist/notistack.esm.js +4ms vite:resolve 1ms ../lib/firebase -> /home/lcss/my-project/src/lib/firebase.js +0ms vite:resolve 0ms ./theme -> /home/lcss/my-project/src/theme/index.js +1ms vite:resolve 0ms ./routes -> /home/lcss/my-project/src/routes.jsx +1ms vite:resolve 2ms firebase/app -> /home/lcss/my-project/node_modules/firebase/app/dist/index.esm.js +2ms vite:resolve 0ms ./hooks/use-auth -> /home/lcss/my-project/src/hooks/use-auth.js +1ms vite:resolve 1ms firebase/auth -> /home/lcss/my-project/node_modules/firebase/auth/dist/index.esm.js +1ms vite:resolve 0ms ./hooks/use-scroll-reset -> /home/lcss/my-project/src/hooks/use-scroll-reset.js +0ms vite:resolve 1ms firebase/database -> /home/lcss/my-project/node_modules/firebase/database/dist/index.esm.js +1ms vite:resolve 0ms ./components/splash-screen -> /home/lcss/my-project/src/components/splash-screen.jsx +0ms vite:resolve 0ms ../config -> /home/lcss/my-project/src/config.js +1ms vite:resolve 2ms i18next -> /home/lcss/my-project/node_modules/i18next/dist/esm/i18next.js +4ms vite:resolve 2ms @material-ui/core/locale -> /home/lcss/my-project/node_modules/@material-ui/core/locale/index.js +2ms vite:resolve 2ms ./layouts/dashboard -> /home/lcss/my-project/src/layouts/dashboard/index.jsx +0ms vite:resolve 3ms ../contexts/auth-context -> /home/lcss/my-project/src/contexts/auth-context.jsx +1ms vite:resolve 3ms ./logo -> /home/lcss/my-project/src/components/logo.jsx +0ms vite:resolve 1ms react-i18next -> /home/lcss/my-project/node_modules/react-i18next/dist/es/index.js +1ms vite:resolve 3ms @material-ui/core/styles -> /home/lcss/my-project/node_modules/@material-ui/core/styles/index.js +4ms vite:resolve 2ms ./layouts/main -> /home/lcss/my-project/src/layouts/main/index.jsx +0ms vite:resolve 2ms i18next-browser-languagedetector -> /home/lcss/my-project/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js +0ms vite:resolve 0ms ../utils/deep-merge -> /home/lcss/my-project/src/utils/deep-merge.js +1ms vite:resolve 0ms ./components/auth-guard -> /home/lcss/my-project/src/components/auth-guard.jsx +0ms vite:resolve 0ms ./shadows -> /home/lcss/my-project/src/theme/shadows.js +1ms vite:resolve 0ms ./components/guest-guard -> /home/lcss/my-project/src/components/guest-guard.jsx +0ms vite:resolve 0ms ./components/loading-screen -> /home/lcss/my-project/src/components/loading-screen.jsx +1ms vite:resolve 1ms ./pages/login -> /home/lcss/my-project/src/pages/login.jsx +2ms vite:resolve 0ms ./pages/home -> /home/lcss/my-project/src/pages/home.jsx +0ms vite:resolve 0ms ./pages/classes -> /home/lcss/my-project/src/pages/classes.jsx +1ms vite:resolve 1ms ./pages/errors/not-found -> /home/lcss/my-project/src/pages/errors/not-found.jsx +4ms vite:resolve 0ms ./pages/errors/server-error -> /home/lcss/my-project/src/pages/errors/server-error.jsx +9ms vite:resolve 1ms nprogress -> /home/lcss/my-project/node_modules/nprogress/nprogress.js +6ms vite:resolve 2ms react-firebase-hooks/database -> /home/lcss/my-project/node_modules/react-firebase-hooks/database/dist/index.esm.js +3ms vite:resolve 2ms react-router -> /home/lcss/my-project/node_modules/react-router/index.js +2ms vite:resolve 2ms ./navbar -> /home/lcss/my-project/src/layouts/dashboard/navbar.jsx +0ms vite:resolve 2ms ../hooks/use-auth -> /home/lcss/my-project/src/hooks/use-auth.js +2ms vite:resolve 2ms @material-ui/icons -> /home/lcss/my-project/node_modules/@material-ui/icons/esm/index.js +0ms vite:resolve 1ms ./sidebar -> /home/lcss/my-project/src/layouts/dashboard/sidebar.jsx +2ms vite:resolve 1ms ./top-bar -> /home/lcss/my-project/src/layouts/main/top-bar.jsx +0ms vite:resolve 1ms ../pages/login -> /home/lcss/my-project/src/pages/login.jsx +1ms vite:resolve 1ms ../components/dashboard/shortcut-list -> /home/lcss/my-project/src/components/dashboard/shortcut-list.jsx +0ms vite:resolve 1ms ../components/logo -> /home/lcss/my-project/src/components/logo.jsx +1ms vite:resolve 0ms ../../components/logo -> /home/lcss/my-project/src/components/logo.jsx +4ms vite:resolve 0ms ./shortcut-item -> /home/lcss/my-project/src/components/dashboard/shortcut-item.jsx +1ms vite:resolve 0ms ./account-popover -> /home/lcss/my-project/src/layouts/dashboard/account-popover.jsx +1ms vite:resolve 1ms ../../hooks/use-auth -> /home/lcss/my-project/src/hooks/use-auth.js +1ms vite:resolve 1ms ./apps-popover -> /home/lcss/my-project/src/layouts/dashboard/apps-popover.jsx +1ms vite:resolve 1ms ../../lib/firebase -> /home/lcss/my-project/src/lib/firebase.js +2ms vite:resolve 0ms ./language-popover -> /home/lcss/my-project/src/layouts/dashboard/language-popover.jsx +0ms vite:resolve 0ms ./unit-popover -> /home/lcss/my-project/src/layouts/dashboard/unit-popover.jsx +1ms vite:resolve 0ms ./nav-section -> /home/lcss/my-project/src/layouts/dashboard/nav-section.jsx +0ms vite:resolve 1ms ./nav-item -> /home/lcss/my-project/src/layouts/dashboard/nav-item.jsx +8ms vite:deps Scan completed in 161ms: { react: '/home/lcss/my-project/node_modules/react/index.js', 'react-dom': '/home/lcss/my-project/node_modules/react-dom/index.js', 'react-helmet-async': '/home/lcss/my-project/node_modules/react-helmet-async/lib/index.module.js', 'react-router-dom': '/home/lcss/my-project/node_modules/react-router-dom/index.js', 'prop-types': '/home/lcss/my-project/node_modules/prop-types/index.js', '@material-ui/core': '/home/lcss/my-project/node_modules/@material-ui/core/index.js', 'history/browser': '/home/lcss/my-project/node_modules/history/browser.js', notistack: '/home/lcss/my-project/node_modules/notistack/dist/notistack.esm.js', 'firebase/app': '/home/lcss/my-project/node_modules/firebase/app/dist/index.esm.js', 'firebase/auth': '/home/lcss/my-project/node_modules/firebase/auth/dist/index.esm.js', 'firebase/database': '/home/lcss/my-project/node_modules/firebase/database/dist/index.esm.js', i18next: '/home/lcss/my-project/node_modules/i18next/dist/esm/i18next.js', '@material-ui/core/locale': '/home/lcss/my-project/node_modules/@material-ui/core/locale/index.js', 'react-i18next': '/home/lcss/my-project/node_modules/react-i18next/dist/es/index.js', '@material-ui/core/styles': '/home/lcss/my-project/node_modules/@material-ui/core/styles/index.js', 'i18next-browser-languagedetector': '/home/lcss/my-project/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js', nprogress: '/home/lcss/my-project/node_modules/nprogress/nprogress.js', 'react-firebase-hooks/database': '/home/lcss/my-project/node_modules/react-firebase-hooks/database/dist/index.esm.js', 'react-router': '/home/lcss/my-project/node_modules/react-router/index.js', '@material-ui/icons': '/home/lcss/my-project/node_modules/@material-ui/icons/esm/index.js' } +148ms Pre-bundling dependencies: react react-dom react-helmet-async react-router-dom prop-types (...and 15 more) (this will be run only when your dependencies or config have changed) vite:resolve 1ms @firebase/app -> null +0ms vite:resolve 1ms @firebase/app -> /home/lcss/my-project/node_modules/@firebase/app/dist/index.esm.js +0ms vite:resolve 1ms @firebase/auth -> null +3ms vite:resolve 1ms @firebase/database -> null +0ms vite:resolve 2ms @firebase/auth -> /home/lcss/my-project/node_modules/@firebase/auth/dist/auth.esm.js +4ms vite:resolve 2ms @firebase/database -> /home/lcss/my-project/node_modules/@firebase/database/dist/index.esm.js +0ms vite:resolve 0ms @babel/runtime/helpers/classCallCheck -> null +3ms vite:resolve 3ms @babel/runtime/helpers/classCallCheck -> /home/lcss/my-project/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +4ms vite:resolve 1ms @babel/runtime/helpers/slicedToArray -> null +12ms vite:resolve 1ms @babel/runtime/helpers/defineProperty -> null +0ms vite:resolve 1ms @babel/runtime/helpers/objectWithoutProperties -> null +0ms vite:resolve 0ms history -> null +0ms vite:resolve 0ms @babel/runtime/helpers/createClass -> null +0ms vite:resolve 7ms @babel/runtime/helpers/slicedToArray -> /home/lcss/my-project/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +16ms vite:resolve 7ms @babel/runtime/helpers/defineProperty -> /home/lcss/my-project/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0ms vite:resolve 8ms @babel/runtime/helpers/objectWithoutProperties -> /home/lcss/my-project/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +1ms vite:resolve 8ms history -> /home/lcss/my-project/node_modules/history/index.js +0ms vite:resolve 8ms @babel/runtime/helpers/createClass -> /home/lcss/my-project/node_modules/@babel/runtime/helpers/esm/createClass.js +0ms vite:resolve 0ms react-fast-compare -> null +31ms vite:resolve 1ms react-fast-compare -> /home/lcss/my-project/node_modules/react-fast-compare/index.js +24ms vite:resolve 0ms @babel/runtime/helpers/typeof -> null +3ms vite:resolve 0ms @babel/runtime/helpers/typeof -> /home/lcss/my-project/node_modules/@babel/runtime/helpers/esm/typeof.js +2ms vite:resolve 1ms tslib -> null +2ms vite:resolve 1ms tslib -> /home/lcss/my-project/node_modules/tslib/tslib.es6.js +3ms vite:resolve 1ms @babel/runtime/helpers/esm/classCallCheck -> null +2ms vite:resolve 3ms @babel/runtime/helpers/esm/classCallCheck -> /home/lcss/my-project/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +4ms vite:resolve 1ms @babel/runtime/helpers/esm/createClass -> null +23ms vite:resolve 0ms @babel/runtime/helpers/esm/createClass -> /home/lcss/my-project/node_modules/@babel/runtime/helpers/esm/createClass.js +20ms vite:resolve 0ms invariant -> null +1ms vite:resolve 0ms invariant -> /home/lcss/my-project/node_modules/invariant/browser.js +2ms vite:resolve 0ms react-is -> null +4ms vite:resolve 0ms @firebase/util -> null +0ms vite:resolve 2ms @firebase/util -> /home/lcss/my-project/node_modules/@firebase/util/dist/index.esm.js +6ms vite:resolve 1ms react-is -> /home/lcss/my-project/node_modules/prop-types/node_modules/react-is/index.js +0ms vite:resolve 0ms shallowequal -> null +4ms vite:resolve 0ms @babel/runtime/helpers/esm/extends -> null +0ms vite:resolve 3ms shallowequal -> /home/lcss/my-project/node_modules/shallowequal/index.js +4ms vite:resolve 3ms @babel/runtime/helpers/esm/extends -> /home/lcss/my-project/node_modules/@babel/runtime/helpers/esm/extends.js +0ms vite:resolve 0ms @firebase/component -> null +7ms vite:resolve 1ms @firebase/component -> /home/lcss/my-project/node_modules/@firebase/component/dist/index.esm.js +6ms vite:resolve 1ms html-parse-stringify -> null +4ms vite:resolve 1ms html-parse-stringify -> /home/lcss/my-project/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js +3ms vite:resolve 0ms @firebase/logger -> null +2ms vite:resolve 1ms @firebase/logger -> /home/lcss/my-project/node_modules/@firebase/logger/dist/index.esm.js +2ms vite:resolve 0ms @babel/runtime/helpers/esm/typeof -> null +26ms vite:resolve 2ms @babel/runtime/helpers/esm/typeof -> /home/lcss/my-project/node_modules/@babel/runtime/helpers/esm/typeof.js +27ms vite:resolve 0ms @babel/runtime/helpers/esm/objectSpread -> null +59ms vite:resolve 1ms @babel/runtime/helpers/esm/objectSpread -> /home/lcss/my-project/node_modules/@babel/runtime/helpers/esm/objectSpread.js +58ms vite:resolve 0ms @babel/runtime/helpers/esm/possibleConstructorReturn -> null +26ms vite:resolve 0ms @babel/runtime/helpers/esm/possibleConstructorReturn -> /home/lcss/my-project/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +26ms vite:resolve 0ms @babel/runtime/helpers/esm/getPrototypeOf -> null +4ms vite:resolve 0ms @babel/runtime/helpers/esm/getPrototypeOf -> /home/lcss/my-project/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +4ms vite:resolve 2ms @babel/runtime/helpers/esm/assertThisInitialized -> null +22ms vite:resolve 0ms @material-ui/unstyled -> null +0ms vite:resolve 0ms @material-ui/styles -> null +0ms vite:resolve 10ms @babel/runtime/helpers/esm/assertThisInitialized -> /home/lcss/my-project/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +32ms vite:resolve 10ms @material-ui/unstyled -> /home/lcss/my-project/node_modules/@material-ui/unstyled/index.js +0ms vite:resolve 11ms @material-ui/styles -> /home/lcss/my-project/node_modules/@material-ui/styles/index.js +1ms vite:resolve 0ms object-assign -> null +30ms vite:resolve 1ms object-assign -> /home/lcss/my-project/node_modules/object-assign/index.js +182ms vite:resolve 1ms clsx -> null +16ms vite:resolve 1ms @babel/runtime/helpers/esm/inherits -> null +0ms vite:resolve 2ms history -> /home/lcss/my-project/node_modules/history/index.js +17ms vite:resolve 2ms clsx -> /home/lcss/my-project/node_modules/clsx/dist/clsx.m.js +36ms vite:resolve 3ms @babel/runtime/helpers/esm/inherits -> /home/lcss/my-project/node_modules/@babel/runtime/helpers/esm/inherits.js +1ms vite:resolve 0ms void-elements -> null +4ms vite:resolve 1ms void-elements -> /home/lcss/my-project/node_modules/void-elements/index.js +2ms vite:resolve 0ms @material-ui/core/Slide -> null +6ms vite:resolve 0ms scheduler -> null +0ms vite:resolve 3ms @material-ui/core/Slide -> /home/lcss/my-project/node_modules/@material-ui/core/Slide/index.js +8ms vite:resolve 3ms scheduler -> /home/lcss/my-project/node_modules/scheduler/index.js +11ms vite:resolve 0ms @material-ui/utils -> null +7ms vite:resolve 1ms @material-ui/utils -> /home/lcss/my-project/node_modules/@material-ui/utils/esm/index.js +5ms vite:resolve 1ms @babel/runtime/helpers/esm/objectWithoutPropertiesLoose -> null +2ms vite:resolve 0ms @babel/runtime/helpers/esm/objectWithoutPropertiesLoose -> /home/lcss/my-project/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +1ms vite:resolve 32ms scheduler/tracing -> null +62ms vite:resolve 1ms scheduler/tracing -> /home/lcss/my-project/node_modules/scheduler/tracing.js +69ms vite:resolve 5ms jss-plugin-rule-value-function -> null +6ms vite:resolve 5ms @material-ui/styled-engine -> null +0ms > node_modules/notistack/dist/notistack.esm.js:5:64: error: [vite:dep-pre-bundle] Cannot find module '@material-ui_core_styles' Require stack: - /home/lcss/my-project/node_modules/vite/dist/node/chunks/dep-8baf35b6.js - /home/lcss/my-project/node_modules/vite/dist/node/cli.js - /home/lcss/my-project/node_modules/vite/bin/vite.js 5 │ import { withStyles, createStyles, emphasize, makeStyles } from '@material-ui/core/styles'; ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vite/dist/node/chunks/dep-8baf35b6.js:65417:18: note: This error came from the "onResolve" callback registered here 65417 │ build.onResolve({ filter: /^[\w@][^:]/ }, async ({ path: id, importer, kind, resolveDir }) => { ╵ ~~~~~~~~~ at setup (/home/lcss/my-project/node_modules/vite/dist/node/chunks/dep-8baf35b6.js:65417:19) at handlePlugins (/home/lcss/my-project/node_modules/esbuild/lib/main.js:686:7) at Object.buildOrServe (/home/lcss/my-project/node_modules/esbuild/lib/main.js:903:44) at /home/lcss/my-project/node_modules/esbuild/lib/main.js:1444:17 at new Promise (<anonymous>) at Object.build (/home/lcss/my-project/node_modules/esbuild/lib/main.js:1443:14) at Object.build (/home/lcss/my-project/node_modules/esbuild/lib/main.js:1334:51) at optimizeDeps (/home/lcss/my-project/node_modules/vite/dist/node/chunks/dep-8baf35b6.js:65643:34) at processTicksAndRejections (internal/process/task_queues.js:93:5) vite:resolve 27ms jss-plugin-rule-value-function -> /home/lcss/my-project/node_modules/jss-plugin-rule-value-function/dist/jss-plugin-rule-value-function.esm.js +95ms vite:resolve 27ms @material-ui/styled-engine -> /home/lcss/my-project/node_modules/@material-ui/styled-engine/index.js +0ms vite:resolve 27ms react-is -> /home/lcss/my-project/node_modules/react-is/index.js +0ms vite:resolve 1ms @material-ui/core/Collapse -> null +30ms vite:resolve 0ms @material-ui/system -> null +0ms vite:resolve 17ms @material-ui/core/Collapse -> /home/lcss/my-project/node_modules/@material-ui/core/Collapse/index.js +20ms vite:resolve 17ms @material-ui/system -> /home/lcss/my-project/node_modules/@material-ui/system/esm/index.js +0ms vite:resolve 1ms jss-plugin-global -> null +20ms vite:resolve 11ms jss-plugin-global -> /home/lcss/my-project/node_modules/jss-plugin-global/dist/jss-plugin-global.esm.js +15ms vite:resolve 3ms @material-ui/core/SvgIcon -> null +17ms vite:resolve 3ms @emotion/styled -> null +0ms vite:resolve 2ms @material-ui/unstyled/ModalUnstyled -> null +0ms vite:resolve 26ms @material-ui/core/SvgIcon -> /home/lcss/my-project/node_modules/@material-ui/core/SvgIcon/index.js +32ms vite:resolve 26ms @emotion/styled -> /home/lcss/my-project/node_modules/@emotion/styled/dist/emotion-styled.browser.esm.js +0ms vite:resolve 26ms @material-ui/unstyled/ModalUnstyled -> /home/lcss/my-project/node_modules/@material-ui/unstyled/ModalUnstyled/index.js +0ms vite:resolve 10ms jss -> null +166ms vite:resolve 10ms jss-plugin-nested -> null +0ms vite:resolve 6ms @emotion/react -> null +0ms vite:resolve 3ms @material-ui/core/ClickAwayListener -> null +1ms vite:resolve 190ms jss -> /home/lcss/my-project/node_modules/jss/dist/jss.esm.js +331ms vite:resolve 194ms jss-plugin-nested -> /home/lcss/my-project/node_modules/jss-plugin-nested/dist/jss-plugin-nested.esm.js +4ms vite:resolve 195ms @emotion/react -> /home/lcss/my-project/node_modules/@emotion/react/dist/emotion-react.browser.esm.js +1ms vite:resolve 196ms @material-ui/core/ClickAwayListener -> /home/lcss/my-project/node_modules/@material-ui/core/ClickAwayListener/index.js +1ms vite:resolve 22ms hoist-non-react-statics -> null +230ms vite:resolve 67ms hoist-non-react-statics -> /home/lcss/my-project/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +120ms vite:resolve 6ms react/jsx-runtime -> null +512ms vite:resolve 6ms jss-plugin-camel-case -> null +0ms vite:resolve 24ms react/jsx-runtime -> /home/lcss/my-project/node_modules/react/jsx-runtime.js +451ms vite:resolve 24ms jss-plugin-camel-case -> /home/lcss/my-project/node_modules/jss-plugin-camel-case/dist/jss-plugin-camel-case.esm.js +0ms vite:resolve 14ms jss-plugin-default-unit -> null +947ms vite:resolve 3ms jss-plugin-default-unit -> /home/lcss/my-project/node_modules/jss-plugin-default-unit/dist/jss-plugin-default-unit.esm.js +927ms vite:resolve 2ms react-is -> /home/lcss/my-project/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +2s vite:resolve 6ms @babel/runtime/helpers/extends -> null +170ms vite:resolve 4ms @babel/runtime/helpers/extends -> /home/lcss/my-project/node_modules/@babel/runtime/helpers/esm/extends.js +169ms vite:resolve 2ms @material-ui/core/utils -> null +178ms vite:resolve 4ms @material-ui/core/utils -> /home/lcss/my-project/node_modules/@material-ui/core/utils/index.js +178ms vite:resolve 1ms jss-plugin-vendor-prefixer -> null +253ms vite:resolve 4ms jss-plugin-vendor-prefixer -> /home/lcss/my-project/node_modules/jss-plugin-vendor-prefixer/dist/jss-plugin-vendor-prefixer.esm.js +253ms vite:resolve 1ms @popperjs/core -> null +123ms vite:resolve 1ms react-transition-group -> null +0ms vite:resolve 5ms @popperjs/core -> /home/lcss/my-project/node_modules/@popperjs/core/lib/index.js +123ms vite:resolve 6ms react-transition-group -> /home/lcss/my-project/node_modules/react-transition-group/esm/index.js +1ms vite:resolve 7ms @emotion/cache -> null +35ms vite:resolve 6ms is-in-browser -> null +0ms vite:resolve 1ms jss-plugin-props-sort -> null +0ms vite:resolve 47ms @emotion/cache -> /home/lcss/my-project/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js +77ms vite:resolve 47ms is-in-browser -> /home/lcss/my-project/node_modules/is-in-browser/dist/module.js +0ms vite:resolve 47ms jss-plugin-props-sort -> /home/lcss/my-project/node_modules/jss-plugin-props-sort/dist/jss-plugin-props-sort.esm.js +0ms vite:resolve 5ms @emotion/is-prop-valid -> null +55ms vite:resolve 3ms tiny-warning -> null +0ms vite:resolve 0ms @material-ui/unstyled/BackdropUnstyled -> null +0ms vite:resolve 26ms @emotion/is-prop-valid -> /home/lcss/my-project/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.browser.esm.js +33ms vite:resolve 26ms tiny-warning -> /home/lcss/my-project/node_modules/tiny-warning/dist/tiny-warning.esm.js +0ms vite:resolve 27ms @material-ui/unstyled/BackdropUnstyled -> /home/lcss/my-project/node_modules/@material-ui/unstyled/BackdropUnstyled/index.js +1ms vite:resolve 1ms css-vendor -> null +32ms vite:resolve 1ms hyphenate-style-name -> null +0ms vite:resolve 0ms @emotion/weak-memoize -> null +0ms vite:resolve 24ms css-vendor -> /home/lcss/my-project/node_modules/css-vendor/dist/css-vendor.esm.js +29ms vite:resolve 24ms hyphenate-style-name -> /home/lcss/my-project/node_modules/hyphenate-style-name/index.js +0ms vite:resolve 24ms @emotion/weak-memoize -> /home/lcss/my-project/node_modules/@emotion/weak-memoize/dist/weak-memoize.browser.esm.js +0ms vite:resolve 3ms @material-ui/unstyled/BadgeUnstyled -> null +31ms vite:resolve 2ms @emotion/sheet -> null +0ms vite:resolve 17ms @material-ui/unstyled/BadgeUnstyled -> /home/lcss/my-project/node_modules/@material-ui/unstyled/BadgeUnstyled/index.js +24ms vite:resolve 17ms @emotion/sheet -> /home/lcss/my-project/node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.js +0ms vite:resolve 3ms @emotion/utils -> null +32ms vite:resolve 2ms @babel/runtime/helpers/esm/inheritsLoose -> null +0ms vite:resolve 28ms @emotion/utils -> /home/lcss/my-project/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js +43ms vite:resolve 29ms @babel/runtime/helpers/esm/inheritsLoose -> /home/lcss/my-project/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +1ms vite:resolve 4ms @material-ui/unstyled/SliderUnstyled -> null +38ms vite:resolve 3ms stylis -> null +0ms vite:resolve 3ms @material-ui/unstyled/Portal -> null +0ms vite:resolve 2ms @emotion/serialize -> null +0ms vite:resolve 48ms @material-ui/unstyled/SliderUnstyled -> /home/lcss/my-project/node_modules/@material-ui/unstyled/SliderUnstyled/index.js +58ms vite:resolve 48ms stylis -> /home/lcss/my-project/node_modules/stylis/index.js +0ms vite:resolve 48ms @material-ui/unstyled/Portal -> /home/lcss/my-project/node_modules/@material-ui/unstyled/Portal/index.js +0ms vite:resolve 49ms @emotion/serialize -> /home/lcss/my-project/node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js +1ms vite:resolve 1ms @babel/runtime/helpers/esm/toConsumableArray -> null +60ms vite:resolve 1ms @emotion/memoize -> null +1ms vite:resolve 1ms @emotion/hash -> null +0ms vite:resolve 9ms @babel/runtime/helpers/esm/toConsumableArray -> /home/lcss/my-project/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +20ms vite:resolve 9ms @emotion/memoize -> /home/lcss/my-project/node_modules/@emotion/memoize/dist/emotion-memoize.browser.esm.js +0ms vite:resolve 9ms @emotion/hash -> /home/lcss/my-project/node_modules/@emotion/hash/dist/hash.browser.esm.js +0ms vite:resolve 0ms @emotion/unitless -> null +15ms vite:resolve 2ms @emotion/unitless -> /home/lcss/my-project/node_modules/@emotion/unitless/dist/unitless.browser.esm.js +9ms vite:resolve 0ms dom-helpers/addClass -> null +4ms vite:resolve 2ms dom-helpers/addClass -> /home/lcss/my-project/node_modules/dom-helpers/esm/addClass.js +4ms vite:resolve 1ms dom-helpers/removeClass -> null +8ms vite:resolve 2ms dom-helpers/removeClass -> /home/lcss/my-project/node_modules/dom-helpers/esm/removeClass.js +7ms error when starting dev server: Error: Build failed with 1 error: node_modules/notistack/dist/notistack.esm.js:5:64: error: [vite:dep-pre-bundle] Cannot find module '@material-ui_core_styles' Require stack: - /home/lcss/my-project/node_modules/vite/dist/node/chunks/dep-8baf35b6.js - /home/lcss/my-project/node_modules/vite/dist/node/cli.js - /home/lcss/my-project/node_modules/vite/bin/vite.js at failureErrorWithLog (/home/lcss/my-project/node_modules/esbuild/lib/main.js:1224:15) at buildResponseToResult (/home/lcss/my-project/node_modules/esbuild/lib/main.js:936:32) at /home/lcss/my-project/node_modules/esbuild/lib/main.js:1035:20 at /home/lcss/my-project/node_modules/esbuild/lib/main.js:568:9 at handleIncomingPacket (/home/lcss/my-project/node_modules/esbuild/lib/main.js:657:9) at Socket.readFromStdout (/home/lcss/my-project/node_modules/esbuild/lib/main.js:535:7) at Socket.emit (events.js:315:20) at addChunk (_stream_readable.js:309:12) at readableAddChunk (_stream_readable.js:284:9) at Socket.Readable.push (_stream_readable.js:223:10)
could you try version 2.2.1?
The fix came faster than me writing the issue. It's working fine on v2.2.1.
Describe the bug
Can't import
import { experimentalStyled as styled } from '@material-ui/core/styles'
on vite >=v2.2.0.Reproduction
System Info
Output of
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
:Used package manager: npm
Logs