Back to Zenii Support

administrator57283
administrator57283

Hello Everyone,

I am new to this, can someone please guide. When I include CDN to partials than TailwindCSS components are working however normally not

<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">

Can someone please help

The Bakerdev
The Bakerdev

Hello administrator57283,

By default, Tailwindcss is included in zenii theme but already stripped down of unused classes since its already purged and compiled. In case you want to use tailwinds' other classes you must recompile the css so it will include your tailwind classes.

Example: You want to add new sections and use tailwind classes, first you need to run

npm run dev

This will create an uncompiled and unpurged style.css with tailwindcss so you can use its classes. Then recompile the style for production using

npm run prod

Hope this helps.

administrator57283
administrator57283

Hello,

Thanks for the help, I got this error

node_modules/.bin/cross-env: Permissi on denied

So I tried

npm rebuild, this worked for the permissions and I ran again npm run dev

and than

I got this error:

npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! zenii@1.2.0 development: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the zenii@1.2.0 development 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! /root/.npm/_logs/2020-10-22T22_04_23_284Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! zenii@1.2.0 dev: npm run development npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the zenii@1.2.0 dev 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! /root/.npm/_logs/2020-10-22T22_04_23_482Z-debug.log

The Bakerdev
The Bakerdev

Hi administrator57283

Try clearing npm cache and remove node_modules folder

1.) Clear cache - npm cache clean --force 2.) Delete node_modules folder 3.) Delete package-lock.json 4.) Install a fresh package npm install 5.) Build the assets npm run dev

Make sure the folder where your node_modules are installed has proper permission.

Hope this helps.

1-4 of 4