artpods56
artpods56
DDeno
Created by artpods56 on 11/17/2024 in #help
Cant configure Tailwind with DaisyUI using Deno inside of Docker | Error: Cannot find module daisyui
I'm literally pulling my hair right now because i can't figure out why is it not working in my case. I got tailwind to work but i can't figure out why the DaisyUI can't be found. Im using docker for local development and here is my config related to deno. deno.json
{
"imports": {
"tailwindcss": "npm:tailwindcss@latest",
"daisyui": "npm:daisyui@latest",
"postcss": "npm:postcss@latest",
"autoprefixer": "npm:autoprefixer@latest"
},
"tasks": {
"build:css": "deno run -A npm:tailwindcss -i ./src/styles.css -o /static/styles.css --minify --watch"
},

"exclude": [
"dist/"
]

}

{
"imports": {
"tailwindcss": "npm:tailwindcss@latest",
"daisyui": "npm:daisyui@latest",
"postcss": "npm:postcss@latest",
"autoprefixer": "npm:autoprefixer@latest"
},
"tasks": {
"build:css": "deno run -A npm:tailwindcss -i ./src/styles.css -o /static/styles.css --minify --watch"
},

"exclude": [
"dist/"
]

}

tailwind.package.js
/** @type {import('tailwindcss').Config} */


module.exports = {
content: ["/templates/**/*.{html,js}"],
theme: {
extend: {},
},
plugins: [require("daisyui")],
}
/** @type {import('tailwindcss').Config} */


module.exports = {
content: ["/templates/**/*.{html,js}"],
theme: {
extend: {},
},
plugins: [require("daisyui")],
}
Error message from container logs
Attaching to django_demo, deno-1
deno-1 | Task build:css deno run -A npm:tailwindcss -i ./src/styles.css -o /static/styles.css --minify --watch
deno-1 |
deno-1 | Rebuilding...
deno-1 | Searching for config: 0.110ms
deno-1 | Module dependencies: 0.002ms
deno-1 | Error: Cannot find module 'daisyui'
deno-1 | Require stack:
deno-1 | - /deno/tailwind.config.js
deno-1 | at Function.Module._resolveFilename (node:module:619:15)
deno-1 | at Function.resolve (node:module:821:19)
deno-1 | at _resolve (file:///deno-dir/npm/registry.npmjs.org/jiti/1.21.6/dist/jiti.js:1:242050)
deno-1 | at loadConfig (file:///deno-dir/npm/registry.npmjs.org/tailwindcss/3.4.15/lib/lib/load-config.js:58:6) {
deno-1 | code: "MODULE_NOT_FOUND",
deno-1 | requireStack: [ "/deno/tailwind.config.js" ]
deno-1 | }
Attaching to django_demo, deno-1
deno-1 | Task build:css deno run -A npm:tailwindcss -i ./src/styles.css -o /static/styles.css --minify --watch
deno-1 |
deno-1 | Rebuilding...
deno-1 | Searching for config: 0.110ms
deno-1 | Module dependencies: 0.002ms
deno-1 | Error: Cannot find module 'daisyui'
deno-1 | Require stack:
deno-1 | - /deno/tailwind.config.js
deno-1 | at Function.Module._resolveFilename (node:module:619:15)
deno-1 | at Function.resolve (node:module:821:19)
deno-1 | at _resolve (file:///deno-dir/npm/registry.npmjs.org/jiti/1.21.6/dist/jiti.js:1:242050)
deno-1 | at loadConfig (file:///deno-dir/npm/registry.npmjs.org/tailwindcss/3.4.15/lib/lib/load-config.js:58:6) {
deno-1 | code: "MODULE_NOT_FOUND",
deno-1 | requireStack: [ "/deno/tailwind.config.js" ]
deno-1 | }
I would really appreciate any help as I'm pretty close to giving up..
3 replies