-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
relative import path <node_module> not prefixed with #7997
Comments
Could you provide the version of Deno you are using and what you command line looks like? I will try to make sure this is accounted for in #7225. |
If it were to import the path, then that would indeed be the expected error, but it shouldn't run at all, as |
you can see the |
Ah, yes, I hadn't spotted that in the image you attached right above the source code. Just to rule out any other possibilities, could you try checking your JavaScript output from TSC, to ensure that there's nothing wrong there? I would assume it's the nullish coalescing operator that is broken here unless it's the |
It is a defect... we statically analyze the dependencies to try to ensure that we eagerly fetch all modules and have them ready. For dynamic As stated, I will try to address it in #7225, which should be closed for 1.5, so about two weeks away. |
I'd presume that it has to do with the module cache/graph updates? I would've expected it to throw before code even ran if it were "static," but that doesn't seem to be the case, could you explain what it's doing with a bit more depth? Maybe you don't need to totally stop doing it (if it can improve performance), but only import those that it can didn't throw? |
It is more than a few lines in an issue I am afraid. As I said, I know what is wrong, the behaviour experienced is undesired, and I am in a process of a major refactor of this part of the code under #7225 that should make the whole process more maintainable in the future, but the whole process has grown organically over the past 2.5 years and needs a good clean out. There are a handful of other issues that need to be address as part of this which I am taking care as well. |
Try this: |
I have some conditionals in my js files so that they work in both deno & latest nodejs, for example:
this worked fine few weeks ago but now I get this error and I'm not sure what to do about it:
I've quick fixed it with
import(`${'worker_threads'}`)
but it's ugly and I don't think people will want to do this for their deno+nodejs modules(EDIT: quickfix actually doesn't work, it only fails later)
The text was updated successfully, but these errors were encountered: