-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Can't import jspm modules #3852
Comments
I believe this is basically the same issue as #3776 : There is a collision of directory and file during caching. Believe we definitely need a careful plan about how to handle similar situations (also we haven't been dealing with queries properly during cache yet) |
Is there already some kind of fix planned or do we have to wait for a refactor of the caching system? Also this seems like a very serious problem, since this is one of the only way to use npm module in deno, is it referenced in the 1.0 roadmap? (please forgive any bad English) |
I actually was gonna start working on something kinda related to this. But it seems that maybe it's better to resolve this first. I think the obvious solution is to encode (hash?) the file names, like @keroxp mentioned in #2790. However, hash collisions will most likely cause even more trouble down the line. I was thinking of encoding the filenames according to some pattern defined by deno (or maybe grab another one that's already proven to be good). So something like base64. Somethig like this would be (probably) always fs agnostic. It would increase compile times a bit, because the encoding/decoding, but maybe it's worth it. EDIT: we could also only deal with the problematic chars ('?' for example) but this would be more of a patch than a solution, I think. |
Related #2763 |
This doesn't really fix it, because even with #4030 and #4040 you will get back the following:
Deno doesn't resolve module specifiers like that. |
The cannot find module problem is actually caused by deno expecting definition file, the only solution I found so far was using plain javascript instead of typescript |
@kitsonk but that import specifier is valid; example:
Now try with
The error originates from |
Why, it is not doing anything with them. Why would it need to check and resolve the dependency graph? It was checking the dependency graph that was causing problems in other places. The problem though here is that the initial I guess ultimately though, we really shouldn't even be trying to load something like jsdom into the compiler. Ideally a |
Trying to import any library trough jspm.io like so:
Always returns either error code 123 "The filename, directory name, or volume label syntax is incorrect", error code 267 "invalid directory name" or error 5 "Permission Denied"
output
The text was updated successfully, but these errors were encountered: