Issue
I have installed nodejs version: v18.2.0
,
and while i am trying to build my css with tailwind, and with the build command:
npx tailwindcss -i ./src/input.css -o ./public/css/output.css --watch
i just get the error:
sh: 1: tailwindcss: Permission denied The terminal process "/usr/bin/bash '-c', 'npx tailwindcss -i ./src/input.css -o ./public/css/output.css --watch'" terminated with exit code: 126.
I am a beginner in tailwindcss and linux(ubuntu) and i dont know where the problem is.
.
.
.
30.5.2022 Update:
I have now installed nodejs and npm correctly.
My Versions are:
[email protected] ~> node -v
v18.2.0
[email protected] ~> npm -v
8.11.0
If i now try to run to run the command:
npx tailwindcss -i ./src/input.css -o ./public/css/output.css --watch
It gives me this output:
sh: 1: tailwindcss: Permission denied
A look at my user permissions with: ls -la
[email protected] ~/D/G/WOWA-BAU-NEU (main)> ls -la
insgesamt 100
drwxrwxr-x 8 jonas jonas 4096 Mai 23 21:47 ./
drwxrwxr-x 3 jonas jonas 4096 Mai 25 22:53 ../
-rw-rw-r-- 1 jonas jonas 11701 Mai 23 21:47 build.css
-rw-rw-r-- 1 jonas jonas 0 Mai 23 21:47 file
drwxrwxr-x 8 jonas jonas 4096 Mai 30 13:51 .git/
drwxrwxr-x 59 jonas jonas 4096 Mai 23 21:47 node_modules/
drwxrwxr-x 2 jonas jonas 4096 Mai 23 21:47 old/
-rw-rw-r-- 1 jonas jonas 60 Mai 23 21:47 package.json
-rw-rw-r-- 1 jonas jonas 45723 Mai 23 21:47 package-lock.json
drwxrwxr-x 5 jonas jonas 4096 Mai 30 13:51 public/
drwxrwxr-x 2 jonas jonas 4096 Mai 23 21:47 src/
-rw-rw-r-- 1 jonas jonas 108 Mai 23 21:47 tailwind.config.js
drwxrwxr-x 2 jonas jonas 4096 Mai 23 21:47 .vscode/
they look correct to write and read.
What I didnt really from you understand was:
If these are all OK, I would recommend looking at your user permissions globally (i.e. make sure you are in the wheel group, which can be done via: usermod -a -G wheel username).
Solution
Had the same problem again after a new installation of ubuntu and for me worked now this solution:
npm rebuild
source: sh: 1: cross-env: Permission denied on laravel mix
Answered By - Jonas Answer Checked By - Marilyn (WPSolving Volunteer)