You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
➜ esm-loader-warning-repro pnpm tsx code.ts
(node:76711) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.
(Use `node --trace-warnings ...` to show where the warning was created)
Hello esm-loader-warning-repro!
I expected:
Hello esm-loader-warning-repro!
I've noticed that we already suppress some warnings in here
In my example above, I do not do any assertions explicitly, it's the latest version of the esm-loader that causes the warning.
If we can do something to make the warning go away in the esm-loader then we can take that path. I'm not very familiar with loader API, but ignoring a warning by adding a string to an array seems like an easy fix with low risk.
I've been annoyed by this warning so I tried to build a slim tsx version. For the JSON import I provided a loader to that there is not warning not usage of experimental API:
privatenumber
changed the title
Experimental Features warnings
ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language
Sep 2, 2023
Bug description
When I run
tsx code.ts
I get following output:I expected:
Hello esm-loader-warning-repro!
I've noticed that we already suppress some warnings in here
Should we suppress this type of warning as well?
Reproduction
I have
"type": "module"
in mypackage.json
:code.ts
has following content:I'm using Node 18:
Environment
Can you work on a fix?
The text was updated successfully, but these errors were encountered: