I just finished a perfectly working ‘Google Drive’ clone as a personal project. It uses cloudinary API and Prisma ORM.
Everything worked perfectly fine until I decided to install TailwindCSS and now the calls don’t work anymore.
For example this line now results always in Error:
const result = await cloudinary.api.resource(publicId, { resource_type: resourceType });
or this prisma query also results always in error, even though if I copy-paste it into another .js file it works perfectly fine.
const folder = await prisma.folder.findUnique({
where: { id: req.params.id },
include: { children: true, files: true }
});
if (!folder) {
throw Error('Folder not found');
}
res.render('folder', { folder });
I’m losing my mind, does someone know why does this happen?
Here is my tailwind.config.js:
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./views/**/*.{html,js,ejs}",
],
darkMode: 'class',
theme: {
extend: {
colors: {
primary: {
"50": "#eff6ff",
"100": "#dbeafe",
"200": "#bfdbfe",
"300": "#93c5fd",
"400": "#60a5fa",
"500": "#3b82f6",
"600": "#2563eb",
"700": "#1d4ed8",
"800": "#1e40af",
"900": "#1e3a8a",
"950": "#172554"
}
},
fontFamily: {
'body': [
'Inter',
'ui-sans-serif',
'system-ui',
'-apple-system',
'system-ui',
'Segoe UI',
'Roboto',
'Helvetica Neue',
'Arial',
'Noto Sans',
'sans-serif',
'Apple Color Emoji',
'Segoe UI Emoji',
'Segoe UI Symbol',
'Noto Color Emoji'
],
'sans': [
'Inter',
'ui-sans-serif',
'system-ui',
'-apple-system',
'system-ui',
'Segoe UI',
'Roboto',
'Helvetica Neue',
'Arial',
'Noto Sans',
'sans-serif',
'Apple Color Emoji',
'Segoe UI Emoji',
'Segoe UI Symbol',
'Noto Color Emoji'
]
}
},
},
plugins: [],
}
Nols is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.