FredKSchott / snowpack

ESM-powered frontend build tool. Instant, lightweight, unbundled development. ✌️
https://www.snowpack.dev
MIT License
19.48k stars 922 forks source link

[BUG] Cannot work with @material-ui/core@next #3138

Closed Jack-Works closed 3 years ago

Jack-Works commented 3 years ago

Bug Report Quick Checklist

Describe the bug

A quick, clear, concise summary of what the bug is.

To Reproduce

We can't fix bugs that we can't see for ourselves. Issues often need to be closed if this section is skipped.

  1. pnpx -y create-snowpack-app --template @snowpack/app-template-react-typescript --target snowpack-test --use-pnpm
  2. cd snowpack-test
  3. pnpm i @emotion/styled@11 @material-ui/core@next @emotion/react@11
  4. pnpm start
  5. Change App.tsx to
import React from 'react';
import { Button } from '@material-ui/core';
export default () => <Button />;
  1. See error!

Error: Package "object-assign" not found. Have you installed it? [12:47:08] [snowpack] [500] /_snowpack/pkg/react.v17.0.2/common/index-3563e646.js

Error: Package "@material-ui/utils" not found. Have you installed it? [12:50:45] [snowpack] [500] /_snowpack/pkg/@material-ui/unstyled.v5.0.0-alpha.29/common/index-0390184d.js

Error: Package "clsx" not found. Have you installed it? [12:50:45] [snowpack] [500] /_snowpack/pkg/@material-ui/unstyled.v5.0.0-alpha.29/common/_clsx_commonjs-external-a76593ca.js

If I install them manually...

  1. pnpm i @material-ui/utils@next object-assign clsx
  2. pnpm start (runtime error!)

Uncaught SyntaxError: The requested module '/_snowpack/pkg/@material-ui.unstyled.SliderUnstyled.v5.0.0-alpha.29.js' does not provide an export named 'getSliderUtilityClass'

drwpow commented 3 years ago

Duplicate of #3124?