I downloaded the latest version of the Blazor demo (Demo 1) and followed the instructions found here:
https://preview.keenthemes.com/blazor/metronic/docs/getting-started
The yarn install
produces this:
D:\Projects\Scholarky\Source-Previous\New\blazor_demo1\Starterkit\_keenthemes\tools>yarn install
➤ YN0000: ┌ Resolution step
➤ YN0002: │ @prettier-x/formatter-2021-01@npm:0.0.1-rc01 [b0008] doesn"t provide remark-parse (pc96b9), requested by remark-math
➤ YN0002: │ bootstrap-maxlength@npm:1.10.1 doesn"t provide popper.js (p0823b), requested by bootstrap
➤ YN0002: │ datatables.net-plugins@npm:1.13.4 doesn"t provide prettier (p05515), requested by prettier-plugin-x
➤ YN0002: │ keenthemes@workspace:. doesn"t provide @egjs/hammerjs (p26ff8), requested by vis-timeline
➤ YN0002: │ keenthemes@workspace:. doesn"t provide component-emitter (p27f09), requested by vis-timeline
➤ YN0002: │ keenthemes@workspace:. doesn"t provide keycharm (pdb290), requested by vis-timeline
➤ YN0002: │ keenthemes@workspace:. doesn"t provide postcss (p6730e), requested by postcss-loader
➤ YN0002: │ keenthemes@workspace:. doesn"t provide prop-types (p425cc), requested by @yaireo/tagify
➤ YN0002: │ keenthemes@workspace:. doesn"t provide propagating-hammerjs (pd5b8f), requested by vis-timeline
➤ YN0002: │ keenthemes@workspace:. doesn"t provide uuid (pcd607), requested by vis-timeline
➤ YN0002: │ keenthemes@workspace:. doesn"t provide vis-data (p6f481), requested by vis-timeline
➤ YN0002: │ keenthemes@workspace:. doesn"t provide vis-util (pe63ac), requested by vis-timeline
➤ YN0002: │ keenthemes@workspace:. doesn"t provide xss (pb7573), requested by vis-timeline
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 341ms
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0000: └ Completed
➤ YN0000: Done with warnings in 0s 727ms
gulp
command and I get this:D:\Projects\Scholarky\Source-Previous\New\blazor_demo1\Starterkit\_keenthemes\tools>gulp
[22:25:32] Local modules not found in D:\Projects\Scholarky\Source-Previous\New\blazor_demo1\Starterkit\_keenthemes\tools
[22:25:32] Try running: yarn install
Hi Keith,
Thank you for reaching out to us.
Unfortunately, after checking this further we were not able to reproduce this issue.
Could you please specify your node and yarn versions?
Try to clear npm cache and reinstall npm dependencies.
npm cache clean --force
.npm install
or yarn install
.Node: v18.16.0
Yarn: 3.6.0
I couldn't find a node_modules folder nor yarn.lock folder, but I ran the npm cache clean and then npm install (instead of using yarn) and then removed the module line from package.json and ran npm run build:
D:\Projects\Scholarky\Source-Previous\New\Starterkit\_keenthemes\tools>npm run build
> keenthemes@1.0.0 build
> webpack
[webpack-cli] Failed to load "D:\Projects\Scholarky\Source-Previous\New\Starterkit\_keenthemes\tools\webpack.config.js" config
[webpack-cli] Error: Cannot find module "webpack-log"
Require stack:
- D:\Projects\Scholarky\Source-Previous\New\Starterkit\_keenthemes\tools\node_modules\webpack-exclude-assets-plugin\lib\index.js
- D:\Projects\Scholarky\Source-Previous\New\Starterkit\_keenthemes\tools\node_modules\webpack-exclude-assets-plugin\index.js
- D:\Projects\Scholarky\Source-Previous\New\Starterkit\_keenthemes\tools\webpack.config.js
- D:\Projects\Scholarky\Source-Previous\New\Starterkit\_keenthemes\tools\node_modules\webpack-cli\lib\webpack-cli.js
- D:\Projects\Scholarky\Source-Previous\New\Starterkit\_keenthemes\tools\node_modules\webpack-cli\lib\bootstrap.js
- D:\Projects\Scholarky\Source-Previous\New\Starterkit\_keenthemes\tools\node_modules\webpack-cli\bin\cli.js
- D:\Projects\Scholarky\Source-Previous\New\Starterkit\_keenthemes\tools\node_modules\webpack\bin\webpack.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
at Module._load (node:internal/modules/cjs/loader:920:27)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object.<anonymous> (D:\Projects\Scholarky\Source-Previous\New\Starterkit\_keenthemes\tools\node_modules\webpack-exclude-assets-plugin\lib\index.js:1:16)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19) {
code: "MODULE_NOT_FOUND",
requireStack: [
"D:\\Projects\\Scholarky\\Source-Previous\\New\\Starterkit\\_keenthemes\\tools\\node_modules\\webpack-exclude-assets-plugin\\lib\\index.js",
"D:\\Projects\\Scholarky\\Source-Previous\\New\\Starterkit\\_keenthemes\\tools\\node_modules\\webpack-exclude-assets-plugin\\index.js",
"D:\\Projects\\Scholarky\\Source-Previous\\New\\Starterkit\\_keenthemes\\tools\\webpack.config.js",
"D:\\Projects\\Scholarky\\Source-Previous\\New\\Starterkit\\_keenthemes\\tools\\node_modules\\webpack-cli\\lib\\webpack-cli.js",
"D:\\Projects\\Scholarky\\Source-Previous\\New\\Starterkit\\_keenthemes\\tools\\node_modules\\webpack-cli\\lib\\bootstrap.js",
"D:\\Projects\\Scholarky\\Source-Previous\\New\\Starterkit\\_keenthemes\\tools\\node_modules\\webpack-cli\\bin\\cli.js",
"D:\\Projects\\Scholarky\\Source-Previous\\New\\Starterkit\\_keenthemes\\tools\\node_modules\\webpack\\bin\\webpack.js"
]
}
I copied another instance of the StarterKit to my C drive instead of my data drive (D) and re-ran the commands and it worked. Maybe there is something hardcoded to look for something on the C drive of a Windows machine?
Hi Keith,
Sorry for the delay in reply.
The build should work with your node and yarn versions.
After checking this it seems like there aren't any hard-coded paths referring to the exact drive.
Just for a test, can you try to build assets in our HTML version on your D drive?
Regards,
Lauris Stepanovs,
Keenthemes Support Team
I tried my C and D drives and I get different errors now. I tried your recommended resolution of clearing the npm cache and deleting those files, but I get this error now:
C:\temp\metronic\blazor_demo1\Starterkit\_keenthemes\tools>npm run build
> keenthemes@1.0.0 build
> webpack
Source: C:/temp/metronic/blazor_demo1/themes/null/html/src
Output: C:/temp/metronic/blazor_demo1/themes/null/html/dist/assets
[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration[0].entry['js/widgets.bundle'] should be a non-empty array.
-> All modules are loaded upon startup. The last one is exported.
Hi Keith,
Thank you for bringing this issue to our attention. We have investigated it, and it appears that the problem occurs specifically on Windows. As a temporary workaround, we suggest the following modification to the webpack.config.js file:
Find this line:
entries["js/widgets.bundle"] = ...
entries["js/widgets.bundle"] = (glob.sync(path.relative("./", srcPath).replaceAll(/\\/g, "/") + "/js/widgets/**/!(_)*.js") || []).map(file => {
return file.replaceAll(/\\/g, "/");
});
I made the change that you suggested and then tried yarn and npm and they both fail. Here is the output from the yarn install method:
C:\temp\metronic\blazor_demo1\Starterkit\_keenthemes\tools>yarn install
➤ YN0000: ┌ Resolution step
➤ YN0061: │ chokidar@npm:2.1.8 is deprecated: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
➤ YN0061: │ source-map-resolve@npm:0.6.0 is deprecated: See https://github.com/lydell/source-map-resolve#deprecated
➤ YN0061: │ core-js@npm:2.6.12 is deprecated: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
➤ YN0032: │ fsevents@npm:2.3.2: Implicit dependencies on node-gyp are discouraged
➤ YN0061: │ fsevents@npm:1.2.13 is deprecated: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2
➤ YN0061: │ source-map-resolve@npm:0.5.3 is deprecated: See https://github.com/lydell/source-map-resolve#deprecated
➤ YN0032: │ nan@npm:2.17.0: Implicit dependencies on node-gyp are discouraged
➤ YN0061: │ resolve-url@npm:0.2.1 is deprecated: https://github.com/lydell/resolve-url#deprecated
➤ YN0061: │ source-map-url@npm:0.4.1 is deprecated: See https://github.com/lydell/source-map-url#deprecated
➤ YN0061: │ urix@npm:0.1.0 is deprecated: Please see https://github.com/lydell/urix#deprecated
➤ YN0061: │ sourcemap-codec@npm:1.4.8 is deprecated: Please use @jridgewell/sourcemap-codec instead
➤ YN0002: │ bootstrap-maxlength@npm:1.10.1 doesn"t provide popper.js (p0823b), requested by bootstrap
➤ YN0002: │ keenthemes@workspace:. doesn"t provide @egjs/hammerjs (p26ff8), requested by vis-timeline
➤ YN0002: │ keenthemes@workspace:. doesn"t provide component-emitter (p27f09), requested by vis-timeline
➤ YN0002: │ keenthemes@workspace:. doesn"t provide keycharm (pdb290), requested by vis-timeline
➤ YN0002: │ keenthemes@workspace:. doesn"t provide postcss (pcd48b), requested by postcss-loader
➤ YN0002: │ keenthemes@workspace:. doesn"t provide prop-types (p425cc), requested by @yaireo/tagify
➤ YN0002: │ keenthemes@workspace:. doesn"t provide propagating-hammerjs (pd5b8f), requested by vis-timeline
➤ YN0002: │ keenthemes@workspace:. doesn"t provide uuid (pcd607), requested by vis-timeline
➤ YN0002: │ keenthemes@workspace:. doesn"t provide vis-data (p6f481), requested by vis-timeline
➤ YN0002: │ keenthemes@workspace:. doesn"t provide vis-util (pe63ac), requested by vis-timeline
➤ YN0002: │ keenthemes@workspace:. doesn"t provide xss (pb7573), requested by vis-timeline
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 5s 360ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ yargs-parser@npm:5.0.1 can"t be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:17.7.2 can"t be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:7.1.2 can"t be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yarn-install@npm:1.0.0 can"t be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yocto-queue@npm:0.1.0 can"t be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 2s 481ms
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0007: │ @fortawesome/fontawesome-free@npm:6.4.2 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js@npm:2.6.12 must be built because it never has been before or the last one failed
➤ YN0007: │ es5-ext@npm:0.10.62 must be built because it never has been before or the last one failed
➤ YN0007: │ vis-timeline@npm:7.7.2 [a754c] must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 3s 186ms
➤ YN0000: Done with warnings in 11s 184ms
C:\temp\metronic\blazor_demo1\Starterkit\_keenthemes\tools>gulp
[08:18:05] Local modules not found in C:\temp\metronic\blazor_demo1\Starterkit\_keenthemes\tools
[08:18:05] Try running: yarn install
C:\temp\metronic\blazor_demo1\Starterkit\_keenthemes\tools>npm run build
> keenthemes@1.0.0 build
> webpack
Source: C:/temp/metronic/blazor_demo1/themes/null/html/src
Output: C:/temp/metronic/blazor_demo1/themes/null/html/dist/assets
[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration[0].entry["js/widgets.bundle"] should be a non-empty array.
-> All modules are loaded upon startup. The last one is exported.
Hi,
We tested our theme with LTS Node and Npm versions.
Node: 18.17.0
Npm: 9.6.7
But installation should still work with your node and npm versions.
Are you using the latest Metronic Blazor Starterkit?
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Downloaded the Blazor Starterkit directly from your site, ran yarn install, then gulp and got this:
<img src="https://i.postimg.cc/3wL7QSjF/error-build.png" />
Node Version: v20.3.0
Npm Version: v9.6.7
Hi,
Could you please try to install Gulp globally?
npm install -g gulp
Same result:
<img src="https://i.postimg.cc/mrqtDPTJ/error-build-2.png" />
Hi,
We tested our theme on various environments but couldn't replicate the same outcome. The same error occurs when we run the gulp command before installing dependencies.
Does the installation command generate a node_modules folder in the _keenthemes/tools directory?
Regards,
Lauris Stepanovs,
Keenthemes Support Team
It does not. So which dependencies do I need to install prior to running the gulp command?
Hi,
Commands yarn install
or npm install
should install all necessary dependencies and put them into keenthemes/tools/node_modules.
Regards,
Lauris Stepanovs,
Keenthemes Support Team
npm install fixed it. maybe include that in the documentation?
Hi,
This information is already included in our getting started docs.
See https://preview.keenthemes.com/blazor/metronic/docs/getting-started
Regards,
Lauris Stepanovs,
Keenthemes Support Team