How can I create a build folder with compiled files for uplo


Topic: How can I create a build folder with compiled files for upload on my own server?

weiger premium asked 4 years ago

Hi,

for testing I used "mdb publish". It is a very nice function. But I would love to have a build. I need to make sass changes for example and want to make a build folder to upload on my own server. How can I do that?

Thanks.

Philip


Marcin Luczak staff answered 4 years ago

Hi,

Do you want to have a build from the published page or do you want to create a build and then publish it to your own server? mdb publish is based on our MDB GO / CLI deployment and it deploys your build/project folder to our servers. If you would like to create a build folder with your sass files changes please check our webpack starter which can help you manage your bundles in the project.


weiger premium answered 4 years ago

Yes, I want to create a build and publish it to my own server. I tried the webpack starter. First I cloned the mdb-webpack-starter repo. Then I did npm install (with the token, installing the mdb-ui-kit-pro-essential). So far it worked. But when I do npm start, I get the following errors:

npm start

> mdb-webpack-starter@3.0.0 start /Users/phil/Documents/test/MDBootstrap/mdb-webpack-starter
> cross-env NODE_ENV=development webpack-dev-server --config webpack/webpack.config.dev.js --open

sh: cross-env: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! mdb-webpack-starter@3.0.0 start: `cross-env NODE_ENV=development webpack-dev-server --config webpack/webpack.config.dev.js --open`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the mdb-webpack-starter@3.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/phil/.npm/_logs/2021-05-04T19_20_03_231Z-debug.log

Do you know, how I can solve this?


Marcin Luczak staff commented 4 years ago

Please check whether you have cross-env dependency in your package.json file. If not, it means you had some issues while installing the dependencies and I would recommend download the webpack starter once again and reinstall it, or do the npm i cross-env and check if this will fix your problem.

If this will fix your problem, you can work on your project and do the npm run build and our webpack will create a dist folder for you, which you can later publish on your server.


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Open

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: Other
  • MDB Version: -
  • Device: Mac
  • Browser: Browser
  • OS: MacOS 10.14.6
  • Provided sample code: No
  • Provided link: No