Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: No build directory

arooly pro asked 6 years ago


I run "yarn build" on pro and general version and is not creating a build directory. What is my mistake? Both are running and compiling without error.

Jakub Strebeyko staff answered 6 years ago


Hi there arooly,

What you are getting from running the build script depends on the project's package.json file. If you are running a plain version of downloaded MDB React App, then the script is actually not for creating a "build directory", but enhancing the existent dist/ directory with the project's JS content compiled into an mdbreact.js file, meaning that what MDB React is, is taken, recompiled and put there anew.

The situation is different when running yarn build in a project, say, created with CRA (create-react-app myapp) - there the building script is handled by a scripting utility called react-scripts, which is optimized to support a rapid development and deployment process (please refer to node_modules/react-scripts/scripts/build.js in your create-react-app created project for details). In that case, it indeed creates a build/ directory, where your whole project should be compiled.

In case you are applying MDB React to an existent project that came to being somehow differently, please refer to the package.json file to see what exactly should happen after typing yarn build.

With Best Regards,
Kuba


arooly pro commented 6 years ago

Thank's Jakub

Jakub Strebeyko staff commented 6 years ago

The pleasure is mine! In case of other questions, the MDB Support Board is here for you.


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

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB React
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags