The New Way to Build with AI! Introducing ReUI — the developer platform for agentic UI with shadcn/ui
Browse ReUI Pro

i cant run templates in asp mvc 9


TypeError: Promise constructor cannot be invoked without 'new'


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 (1)

Hi,

Understanding

You're getting TypeError: Promise constructor cannot be invoked without 'new' when running Metronic templates in an ASP.NET MVC 9 environment. This is a known issue related to Visual Studio's JavaScript debugging and the Promise polyfill in plugins.bundle.js.

Solution

This error occurs when Visual Studio's JavaScript debugging injects code that conflicts with the Promise polyfill in Metronic's bundled plugins. Here are the proven fixes:

Option 1: Disable JavaScript Debugging in Visual Studio

  1. Go to Project Properties > Debugging
  2. Uncheck "Launch browser" (the option that auto-opens a browser when debugging)
  3. Run the application — the error should no longer appear

Option 2: Use dotnet CLI instead of Visual Studio debugger Run from your project root:

dotnet run watch

This bypasses Visual Studio's JavaScript debugging entirely.

Option 3: Remove the es6-shim require In your plugins.js (source file), remove this line:

require("es6-shim/es6-shim.min.js");

Then rebuild assets.

Important: Make sure you're using the correct Metronic version assets:

  • Metronic v8 (Bootstrap) — use v8 assets only, not v9
  • Metronic v9 (Tailwind) — use v9 assets only, not v8

Mixing v8 and v9 JavaScript bundles causes compatibility issues.

Sources

Next Steps

If none of these solutions work, please share:

  1. Which Metronic version you're using (v8 or v9)
  2. Whether you're running through Visual Studio or dotnet CLI
  3. The full error stack trace

This will help us pinpoint the exact cause.


This reply was generated by AI. A human will follow up if needed.

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  :(
buy metronic keenthemes mega bundle

ReUI

Open-source React components, blocks and templates built on shadcn/ui and Tailwind CSS by Keenthemes.