esm.sh icon indicating copy to clipboard operation
esm.sh copied to clipboard

Failed to import when given exports (in combination with alias and deps and target)

Open schlichtanders opened this issue 2 years ago • 1 comments

Failing module

I am currently working with preact and material ui. Awesome combination, however using the export parameter crashes everything

import {Autocomplete,
    createFilterOptions,
    TextField,
    Button,
    Dialog,
    DialogTitle,
    DialogContent,
    DialogContentText,
    DialogActions,
    Accordion,
    AccordionSummary,
    AccordionDetails,
    Typography} from "https://esm.sh/stable/@mui/[email protected]?alias=react:preact/compat,react-dom:preact/compat,react/jsx-runtime:preact/jsx-runtime&[email protected]&target=es2020&exports=Autocomplete,createFilterOptions,TextField,Button,Dialog,DialogTitle,DialogContent,DialogContentText,DialogActions,Accordion,AccordionSummary,AccordionDetails,Typography"

Error message

The browser mentions a 500 response code with the following details

HTTP/3 500 Internal Server Error
date: Fri, 31 Mar 2023 11:59:20 GMT
content-type: application/javascript; charset=utf-8
content-length: 513
cf-ray: 7b086cf5ee99b3aa-MUC
access-control-allow-origin: *
cache-control: private, no-store, no-cache, must-revalidate
vary: Origin, Accept-Encoding
cf-cache-status: DYNAMIC
access-control-expose-headers: X-Typescript-Types
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=FfLsGTE7K3E7YyaBW9W%2BAi766aTI2IP%2BHOKEZ0JgC5L04WiwF0%2FjPlzTiLjjss92LBiJYbYRvFl9ZLXag1Boysxmg8g9sGLeprk7G26AdHnEcuUFxFIoDUGY5rmwBH%2FMBdQhgVI%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400

Additional info

  • esm.sh version: stable
  • Browser version: firefox 109.0.1 (64-bit)

schlichtanders avatar Mar 31 '23 12:03 schlichtanders

seems you give too many options that will generate a long path which can not be handled by the os, we have plan to improve this with hash path.

Error: stat /esms/builds/v113/@mui/[email protected]/X-YS9yZWFjdC1kb206cHJlYWN0L2NvbXBhdCxyZWFjdC9qc3gtcnVudGltZTpwcmVhY3QvanN4LXJ1bnRpbWUscmVhY3Q6cHJlYWN0L2NvbXBhdApkL3ByZWFjdEAxMC42LjYKdHMvQWNjb3JkaW9uLEFjY29yZGlvbkRldGFpbHMsQWNjb3JkaW9uU3VtbWFyeSxBdXRvY29tcGxldGUsQnV0dG9uLERpYWxvZyxEaWFsb2dBY3Rpb25zLERpYWxvZ0NvbnRlbnQsRGlhbG9nQ29udGVudFRleHQsRGlhbG9nVGl0bGUsVGV4dEZpZWxkLFR5cG9ncmFwaHksY3JlYXRlRmlsdGVyT3B0aW9ucw/es2020: file name too long

ije avatar Mar 31 '23 13:03 ije