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

filename too long

Open sachinraja opened this issue 3 years ago • 4 comments

This import isn't ideal, but it doesn't seem like this error should be happening either:

https://esm.sh/[email protected]?alias=swr:https%3A%2F%2Fesm.sh%2Fswr%401.3.0%3Fdeps%3Dreact%4018,@trpc/server:https%3A%2F%2Fesm.sh%2F%40trpc%2Fserver%4010.0.0-alpha.22,@trpc/client:https%3A%2F%2Fesm.sh%2F%40trpc%2Fclient%4010.0.0-alpha.22%3Fdeps%3D%40trpc%2Fserver%4010.0.0-alpha.22&deps=react@18

results in:

/* esm.sh - error */
throw new Error("[esm.sh] " + "stat /esms/builds/v82/[email protected]/X-YS9AdHJwYy9jbGllbnQ6aHR0cHM6Ly9lc20uc2gvQHRycGMvY2xpZW50QDEwLjAuMC1hbHBoYS4yMj9kZXBzPUB0cnBjL3NlcnZlckAxMC4wLjAtYWxwaGEuMjIsQHRycGMvc2VydmVyOmh0dHBzOi8vZXNtLnNoL0B0cnBjL3NlcnZlckAxMC4wLjAtYWxwaGEuMjIsc3dyOmh0dHBzOi8vZXNtLnNoL3N3ckAxLjMuMD9kZXBzPXJlYWN0QDE4CmQvcmVhY3RAMTguMS4w/es2022: file name too long");
export default null;

sachinraja avatar May 22 '22 03:05 sachinraja

@sachinraja when aliasing, you need to use package name only, with version being optional. You used https link that links to the package on esm.sh, and thats the wrong way to alias a package. Fixing the problem will not make this error.

renhiyama avatar May 19 '23 17:05 renhiyama

@ije you can go forward and close this?

renhiyama avatar May 19 '23 17:05 renhiyama

that's not true. I need to use the url so I can specify the react dep for that

sachinraja avatar May 19 '23 17:05 sachinraja

that's not true. I need to use the url so I can specify the react dep for that

According to the docs, aliasing works as ?alias=react:preact/compat or similar. Instead you're linking it as ?alias=react:<url encoded url like https://esm.sh/preact/compat This won't work. Please fix your URL scheming.

renhiyama avatar May 20 '23 05:05 renhiyama