I created a project recently while running Elixir 1.12.3. A template file contains this script:
<script>
document.addEventListener("DOMContentLoaded", function() {
window.createSocket(<%= @topic.id %>)
});
</script>
This was working with no errors shown in VS Code.
I upgraded to Elixir 1.13.3 today - there was a different issue that caused me to do that. But, now the script throws a bunch of errors. One is related to javascript decorators:
[{
"resource": "/c:/Users/.../show.html.heex",
"owner": "_generated_diagnostic_collection_name_#1",
"severity": 8,
"message": "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.",
"source": "javascript",
"startLineNumber": 13,
"startColumn": 33,
"endLineNumber": 13,
"endColumn": 42
}]
Then there are several like this, referring to different positions on the line with windows.createSocket(…):
Expression expected. javascript [13, 29]
I don’t know if the 2 types of errors are related. In the VS Code settings, I added:
“js/ts.implicitProjectConfig.experimentalDecorators”: true
in settings.json, but that error still appears.
The app is using a channel to allow users to add comments to blog posts. The script opens the channel when the page showing the post is rendered. Prior to upgrading Elixir, when a comment was added, it was rendered immediately on the page. After upgrading to 1.13.3, that isn’t happening, even though the app is running.
Is there a known issue about this, or is there another way to open the channel so it
Thanks!