Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

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
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (5)


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



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.

<img src=" alt="image" border="0">

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?


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,

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.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(