steven-tey / novel

Notion-style WYSIWYG editor with AI-powered autocompletion.
https://novel.sh
Apache License 2.0
12.47k stars 1.03k forks source link

Demo app in novel/apps/web has tailwind.config.js that causes break #268

Closed danielsalinasduron closed 7 months ago

danielsalinasduron commented 7 months ago

Hi all,

This is fantastic work!

I am opening this issue because when I cloned the repo and built the demo app using Yarn, the web app failed to load producing the following error:

./styles/globals.css.webpack[javascript/auto]!=!./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[3].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[3].oneOf[12].use[3]!./styles/globals.css
Error: Cannot find module 'tailwind-config/tailwind.config.js'
Require stack:
- /Users/levita/novel/apps/web/tailwind.config.js

The app did not crash when I used the example config

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

That's it! I just thought it would help anyone trying to just clone the repo and deploy their own app to have a config file that does not cause breaking. Please let me know if this is not a good solution; any constructive criticism is welcome.

andrewdoro commented 7 months ago

Not really sure what's the error here, but for now I recommend just using pnpm

danielsalinasduron commented 7 months ago

The issue was that the tailwind.config.js provided with the demo project referenced another tailwind config that was not provided. See the fix here:

https://stackoverflow.com/questions/77820967/cannot-find-module-tailwind-config-tailwind-config-js-even-though-the-tailwind