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

Failed to import - members path of every package

Open hjaurum opened this issue 2 years ago • 2 comments

Background

Failed to import every package by members path. We deployed a self-hosted ESM, and encountered this issue. Then I clone and started esm.sh on my local, encounter the same issue.(based on the newest commit, not stale code)

Failing module

Every package encounters this issue, for instance: Success:

localhost:8080/esm/@ant-design/icons
image

Fail:

localhost:8080/@ant-design/icons/X-ZC9hbnRkQDQuMjQuOCxyZWFjdC1kb21AMTguMi4wLHJlYWN0QDE4LjIuMA/es2022/es/icons/RocketOutlined.bundle.js

The fail response:

/* esm.sh - error */
throw new Error("[esm.sh] " + "resovleESModule: open /var/folders/9x/v2l_3t8970g3qfyfc0yqr_nm0000gn/T/esm-build-191d3c39db320345447f60741089b71e3aafd0b4-f742273a/node_modules/@ant-design/icons/X-ZC9hbnRkQDQuMjQuOCxyZWFjdC1kb21AMTguMi4wLHJlYWN0QDE4LjIuMA/es2022/es/icons/RocketOutlined.bundle.js: no such file or directory");
export default null;
image

Error message

image

Additional info

  • esm.sh version: The newest commit a60ef18c36d659f4d2da2ac380ef471072735140

hjaurum avatar Feb 27 '23 09:02 hjaurum

where does the URL localhost:8080/@ant-design/icons/X-ZC9hbnRkQDQuMjQuOCxyZWFjdC1kb21AMTguMi4wLHJlYWN0QDE4LjIuMA/es2022/es/icons/RocketOutlined.bundle.js come from?

ije avatar Feb 28 '23 03:02 ije

Hey @ije , The URL comes from the correct redirect on visits: localhost:8080/@ant-design/icons/es/icons/RocketOutlined.js?bundle&deps=react@18,react-dom@18,antd@4.

Justinidlerz avatar Mar 02 '23 08:03 Justinidlerz