Topic: MDB PRO for Wordpress

admin priority asked 9 months ago


Expected behavior

Trying to install MDB Pro version ( which I bought ) for Wordpress

Actual behavior

When running "mdb wordpress init" there is no option to initialize Wordpress using the pro components. What needs to be done to create a wordpress theme that has all the pro components enqueued? For example, I want to be able to use the premium templates you have available on: https://mdbootstrap.com/docs/standard/templates/admin-dashboard . Others have asked this question and you simply sent them to the tutorials page which contains NOTHING related to how to initialize a WP theme including the pro components. Please take your time to understand the issue I am trying to solve and DO NOT refer me to the documentation or tutorials!!! Work on having a decent documentation before sending your clients to it! Resources (screenshots, code snippets etc.)


Sebastian Kaczmarek staff answered 8 months ago


When you run mdb wordpress init command you will be presented with a list of available Starters that you can use to start creating your WordPress site. You can choose from example Blog, Ecommerce, Blog & Ecommerce, MDB Starter, or Empty templates.

If you wish to create a custom WP site you need to use either MDB Starter or Empty Starter and proceed with the development on your own. The first Starter will have MDB UI KIT included in the theme already whereas the second one is a clean WP theme that can be developed from scratch.

So basically, we do have a few starter templates dedicated for WP but if you want to create something different you need to initialize a clean theme and proceed with the custom development just as you would with any other WP site.


admin priority commented 8 months ago

I am trying to set webpack up but I am facing these issues when trying to run "npm run build":

[webpack-cli] Error: Unknown option '--colors' [webpack-cli] Run 'webpack --help' to see available commands and options

If I am removing "--colors" from the command, I still get this:

[webpack-cli] Failed to load '/root/wp/mdb-webpack-starter/webpack/webpack.config.prod.js' config [webpack-cli] Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema. - options[0] has an unknown property 'from'. These properties are valid: object { patterns, options? } - options[1] has an unknown property 'to'. These properties are valid: object { patterns, options? }

Stack:

webpack: 5.70.0 webpack-cli: 4.9.2 webpack-dev-server 4.7.4

npm 8.5.3

node v16.14.0


Sebastian Kaczmarek staff commented 8 months ago

@admin I'm a little bit confused. From what I can see you are using MDB Webpack Starter - but this is not a WP theme. Could you please clarify what exactly are you trying to achieve and what is your current setup?


admin priority commented 8 months ago

I know it's not a WP theme, I want to create one. I started with the "Webpack starter" and wanted to make it work so I have the compilers and everything set up. After that I will create the wordpress theme. Can you please reply to the errors I have trying to set webpack up? I placed this ticket yesterday and waited so many hours only to get a reply that doesn't answer my question at all... For the price I paid I'd expect live chat support, not a ticketing system that ignores the issue I posted.


Michał Duszak staff commented 8 months ago

Your webpack issues may be related to your global webpack version. Try downgrading or removing global version of webpack. As stated in package.json, MDB Webpack Starter runs on 4.43.0 https://github.com/mdbootstrap/mdb-webpack-starter/blob/master/package.json#L80 As I can see in logs, issue might be caused by an old pattern for copy-webpack-plugin plugin in config file. It's possible that you also upgraded the plugin, but not the pattern in the config. See how it looked like in 5.1.1 https://github.com/webpack-contrib/copy-webpack-plugin/blob/3b79595d6ef3527a26588112ad17e3c54e264d5c/README.md

And how syntax should look now: https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/README.md

If you meet any more issues, or couldn't resolve the present ones, please provide information about changes that you've made in the config, or if have you updated any dependencies, and what is your global webpack version


admin priority commented 8 months ago

I started form scratch. Removed webpack both globally and locally and reran "npm install" and "npm audit fix" which returns this: https://i.ibb.co/pZS2cGm/Screenshot-at-2022-03-10-17-35-48.png


Michał Duszak staff commented 8 months ago

Remove webpack both globally and locally, remove node_modules folder, and try npm install once again


admin priority commented 8 months ago

npm install: https://i.ibb.co/8gqzqrV/npm-install.png npm audit fix: https://i.ibb.co/sWkWZX5/npm-audit-fix.png npm audit fix --force: https://i.ibb.co/28wQv6n/npm-audit-fix-force.png npm run build: https://i.ibb.co/2s3dRRc/npm-run-build.png


Michał Duszak staff commented 8 months ago

Delete node_modules, then do "npm install cross-env -g", then do "npm install --save". After all, please tell me what's version of your npm and nodejs - try "node -v" and "npm -v"


Michał Duszak staff commented 8 months ago

And try without npm audit fix :)



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • User: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.10.2
  • Device: Pc
  • Browser: Chrome
  • OS: Any OS
  • Provided sample code: No
  • Provided link: Yes