Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

SweetAlert2 is not supported in Angular 17


Hi Team,
As of my research, SweetAlert2 is not supported in Angular 17
Currently, it is supported until the Angular 16 version.

So why it is given in demos of Metronic in angular 17,
Let me know if any alternative way to install dependencies.

Error Screenshot

You can find it at the below link. Why can you use it in your project?
Github Link

My work is stopped due to above dependency, Please guide

Thanks


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (5)


Hi,

Thank you for bringing this to our attention. We appreciate your patience and understanding. It seems there is a compatibility issue with SweetAlert2 in Angular 17.

As a workaround, you can try running the following command to install the dependencies forcefully:

npm install --force


It's worth noting that the compatibility issues often arise due to version mismatches, and running the command above might help in cases where the package versions need to be synchronized.

The SweetAlert2 author is likely to release an update to address compatibility with Angular 17 soon. In the meantime, using the --force flag can serve as a temporary solution.

If you encounter any further difficulties or have additional questions, please feel free to reach out. Thank you for your understanding, and we apologize for any inconvenience caused.



Hello Faizal,

The `force` command seems to be causing issues with those packages in my case. The screenshot here still shows the error persisting. I've also attempted to use Yarn, but unfortunately, it hasn't resolved the issue.

Please provide guidance as soon as possible. This is a significant obstacle for me.

The SweetAlert2 author is likely to release an update to address compatibility with Angular 17 soon. Then how is it working in Metronic's latest version?

Thank you.



Hi,

The screenshot you provided appears to be an error in the VSCode IDE. Could you please try running the application and testing the SweetAlert2 functionality? Sometimes, these errors in the IDE may not necessarily affect the runtime behavior of the application.

If you encounter any issues during the runtime or have further questions, feel free to ask for assistance.



Thanks



Thank you, Faizal.

It appears to be working well; I also received a success alert box. Can you please explain why an error is being displayed in VSCode?



Hi Akib Dahya,

Ensure that the Angular Language Service extension is installed in VSCode. This extension provides improved TypeScript and Angular support. You can install it from the VSCode marketplace.

You can try clearing the VSCode workspace cache by restarting the IDE or using the command palette (Ctrl + Shift + P) and running the command "Developer: Reload Window."

Thanks


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(