formaat-design / reshaped

Community repository for storing examples, reporting issues and tracking roadmap
https://reshaped.so
110 stars 3 forks source link

Error: Cannot find module 'config/tailwind' #148

Closed ghost closed 1 year ago

ghost commented 1 year ago

Error happens while following tailwind integration tutorial. I found that tailwind.js file in root imports from config/tailwind, while postcss.js uses relative import from ./config/postcss. Temporally, importing getTheme directly from reshaped/config/tailwind fixes the issue

// node_modules/reshaped/postcss.js
const config = require("./config/postcss");

module.exports = { config };
// node_modules/reshaped/tailwind.js
const tailwind = require("config/tailwind");

module.exports = tailwind;
// Temporary fix
// tailwind.config.js
const { getTheme } = require("reshaped/config/tailwind");

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: ["./pages/**/*.{js,ts,jsx,tsx}"],
  theme: getTheme(),
};
blvdmitry commented 1 year ago

Thanks for the heads-up, we have this reported and added into our backlog and I'm planning to release a patch this week

blvdmitry commented 1 year ago

I've just published 1.14.1 with the fix to the import path and checked it in the example folder: https://reshaped.so/content/changelog

Let me know if it works fine now or if it's still happening for you

ghost commented 1 year ago

Works great, thank you!