7 Answer(s)
-
0
Hi @angel.segura
The
.min.cssfiles you see are not generated by Angular's standardng buildcommand. Instead, they are created by a task runner called Gulp, which is what ASP.NET Zero uses for its theme asset pipeline. Gulp reads the standard*.cssfiles, combines them, minifies them, and outputs the final.min.cssfiles.The reason these files are generated on one computer but not on another is that the Gulp build process is not running correctly on the second machine.
Here are the specific steps to solve this problem and "force" the generation of the
.min.cssfiles in an ASP.NET Zero project.The command responsible for creating these files is typically
gulp build. To run it:Open a command prompt (like Command Prompt or PowerShell) in your project's
.../angular/directory.Run the following command:
gulp build
This command will execute the tasks defined in the
gulpfile.jsfile, which includes bundling and minifying all the necessary CSS and JS assets, including the Metronic theme files.If the
gulp buildcommand doesn't work or you get an error like "gulpis not recognized...", the issue is likely due to missing tools or corrupted dependencies.On the computer that isn't working, make sure the Gulp Command Line Interface (CLI) is installed globally.
npm install -g gulp-cliYou only need to run this command once on your machine.
Sometimes, the packages in the
node_modulesfolder can become corrupted or incomplete. A clean reinstall is the most reliable way to fix this.In your project's
.../angular/directory, delete thenode_modulesfolder and thepackage-lock.json(oryarn.lock) file.In the command prompt, clear the npm cache (this is optional but recommended):
npm cache clean --forceReinstall all the packages:
npm install(Or simply
yarnif you are using Yarn).After the packages are successfully installed, try running the Gulp task again:
gulp build
In ASP.NET Zero, the configuration for which files to bundle and minify is located in
bundle.json.- Check the
bundle.jsonfile located in the root directory of your solution. - Inside this file, you should see entries that reference the paths for the Metronic theme (e.g.,
metronic/themes/...). Ensure these paths are correct and match the file structure in your project. You usually don't need to change this file, but it's good to verify it.
- Missing Global Packages: The working computer has
gulp-cliinstalled globally, while the non working one does not. - Corrupted
node_modulesFolder: A network error or other issue during thenpm installprocess may have caused some packages to be installed incorrectly or not at all. - Different Node.js/NPM Versions: While less common for this specific issue, significant differences in Node.js or NPM major versions can sometimes cause dependency conflicts.
- Initial Project Setup: When the project was first set up on the working machine, the
gulp buildtask might have been run automatically. Maybe when the code was copied to the new machine, this build step was skipped.
If the problem persists after checking these steps, please do not hesitate to contact us.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
-
0
Hi @angel.segura
Could you share your project version with us? The latest version doesn't include the Metronic styles you specified. If you could share your project version information with us, I can give you a more specific answer. Thank you.
Last version 14.3.0 bundles.json and gulpfile.mjs
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
I don't know where to find the version, but it is an old 2019 project
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi @angel.segura
If your project has an
AppVersionHelperfile under the*Coreproject, the "Version" information is set here. Can you share this information with us?Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
8.0.0.0
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi @angel.segura
To further investigate this issue and provide a more specific answer, could you please email your project to [email protected]? You can send just the "angular" part if you prefer.
Thank you.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)

