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

Error on npm run build --demo1


Just bought Metronic on themeforest. Unable to bundle theme assets using npm run build --demo1.

I got an error below.

> keenthemes@1.0.0 build
> webpack

>> Building...
>> Failed to compile!

resolve 'countup.js/dist/countUp.withPolyfill.min.js' in 'C:\Users\YoungH\source\repos\Metronic\asp.net-core\Starterkit\_keenthemes\tools\webpack\plugins'
Parsed request is a module
using description file: C:\Users\YoungH\source\repos\Metronic\asp.net-core\Starterkit\_keenthemes\tools\package.json (relative path: ./webpack/plugins)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
C:\Users\YoungH\source\repos\Metronic\asp.net-core\Starterkit\_keenthemes\tools\webpack\plugins\node_modules doesn't exist or is not a directory
C:\Users\YoungH\source\repos\Metronic\asp.net-core\Starterkit\_keenthemes\tools\webpack\node_modules doesn't exist or is not a directory
looking for modules in C:\Users\YoungH\source\repos\Metronic\asp.net-core\Starterkit\_keenthemes\tools\node_modules
existing directory C:\Users\YoungH\source\repos\Metronic\asp.net-core\Starterkit\_keenthemes\tools\node_modules\countup.js
using description file: C:\Users\YoungH\source\repos\Metronic\asp.net-core\Starterkit\_keenthemes\tools\node_modules\countup.js\package.json (relative path: .)
using description file: C:\Users\YoungH\source\repos\Metronic\asp.net-core\Starterkit\_keenthemes\tools\node_modules\countup.js\package.json (relative path: ./dist/countUp.withPolyfill.min.js)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:\Users\YoungH\source\repos\Metronic\asp.net-core\Starterkit\_keenthemes\tools\node_modules\countup.js\dist\countUp.withPolyfill.min.js doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\YoungH\source\repos\Metronic\asp.net-core\Starterkit\_keenthemes\tools\node_modules\countup.js\dist\countUp.withPolyfill.min.js.js doesn't exist
.scss
Field 'browser' doesn't contain a valid alias configuration
C:\Users\YoungH\source\repos\Metronic\asp.net-core\Starterkit\_keenthemes\tools\node_modules\countup.js\dist\countUp.withPolyfill.min.js.scss doesn't exist
as directory
C:\Users\YoungH\source\repos\Metronic\asp.net-core\Starterkit\_keenthemes\tools\node_modules\countup.js\dist\countUp.withPolyfill.min.js doesn't exist
C:\Users\YoungH\source\repos\Metronic\asp.net-core\Starterkit\_keenthemes\node_modules doesn't exist or is not a directory
C:\Users\YoungH\source\repos\Metronic\asp.net-core\Starterkit\node_modules doesn't exist or is not a directory
C:\Users\YoungH\source\repos\Metronic\asp.net-core\node_modules doesn't exist or is not a directory
C:\Users\YoungH\source\repos\Metronic\node_modules doesn't exist or is not a directory
looking for modules in C:\Users\YoungH\source\repos\node_modules
C:\Users\YoungH\source\repos\node_modules\countup.js doesn't exist
C:\Users\YoungH\source\node_modules doesn't exist or is not a directory
C:\Users\YoungH\node_modules doesn't exist or is not a directory
C:\Users\node_modules doesn't exist or is not a directory
C:\node_modules doesn't exist or is not a directory
ERROR in ./webpack/plugins/plugins.js 101:17-71
Module not found: Error: Can't resolve 'countup.js/dist/countUp.withPolyfill.min.js' in 'C:\Users\YoungH\source\repos\Metronic\asp.net-core\Starterkit\_keenthemes\tools\webpack\plugins'

webpack compiled with 1 error


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


Hi,

I apologize for the inconvenience you're experiencing with the error during the build process. We are working on a solution to include in the next update of the theme.

It appears that the error is related to the countup.js plugin and its compatibility with the build process. To resolve this issue, you can try the following workaround:

1. Locate the file asp.net-core/Starterkit/_keenthemes/tools/package.json in your project directory.
2. Open the package.json file in a text editor.
3. Look for the line that specifies the version of countup.js, which should be something like "countup.js": "^2.0.7",.
4. Modify the line to set the countup.js version to "2.0.7" without the caret (^) symbol. The updated line should look like "countup.js": "2.0.7",.
5. Save the changes to the package.json file.

By specifying the exact version without the caret symbol (^), you ensure that the build process uses the specified version of countup.js, which may resolve the issue.

After making this change, try running the npm run build --demo1 command again to bundle the theme assets. Hopefully, this workaround will resolve the error you encountered.

If the issue persists or you need further assistance, please provide more information about your project setup, such as the version of Metronic you are using and any relevant configuration files.

Thanks



I am still getting the same erro after changing as you suggested.



Hi,

Please try the following steps to resolve the issue:

1. Delete the `node_modules` folder in asp.net-core/Starterkit/_keenthemes/tools directory.

2. Open your terminal or command prompt.

3. Navigate to your project directory using the `cd asp.net-core/Starterkit/_keenthemes/tools` command.

4. Once inside the project directory, run the following command to install dependencies using Yarn:


yarn install


This command will read the `package.json` file in your project and install all the required dependencies specified in it.

5. Wait for the installation process to complete.

6. After the installation is finished, try running your project again and see if the issue persists.

By removing the `node_modules` folder and reinstalling the dependencies with Yarn, you can ensure a clean installation of the dependencies and resolve any potential conflicts or issues that may have occurred.

Thanks



Thank you for your help. I was able to install everything and run the demo version in Visual Studio. However, no matter what menu I click on, the same screen loads. What do I need to modify in order to make it look like the original template?



Hi,

Please note that our Metronic Asp.Net-Core version is a Starterkit based on our HTML version, it contains a fully functional layout and a few pages for start (New Password, Reset Password, Sign In, Sign Up, Default Dashboard Page, 500 error page and 404 error page).

You can easily add any other pages by referring to our HTML version, all JS, and CSS code required for any page is already included in our Asp.Net-Core Starterkit, all you need to do is just copy HTML markup and include JS file on your page (if it is required).

Please let us know if you have any further questions on this topic or anything else.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Are you saying if all the pages shown in the demo are not provided as source code?



Hi,

The source code of all pages is provided in our HTML version, in Starterkit only a few pages are available by default.

If this prevents you from using Metronic further you can request a refund using this form. 100% money back is guaranteed.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



It's different from what I thought. So, I would appreciate it if you could provide a refund. However, the link you provided is not working. Please send it again.



Hi,

I am so sorry to hear that.

We will be improving our product further and hope to see you back someday.

To request a refund please use this form. 100% money back is guaranteed.

Regards,
Lauris Stepanovs,
Keenthemes Support Team


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  :(