reaviz / reaflow

🎯 React library for building workflow editors, flow charts and diagrams. Maintained by @goodcodeus.
https://reaflow.dev
Apache License 2.0
2.11k stars 122 forks source link

Tailwind error #247

Closed marcosdemelo closed 6 months ago

marcosdemelo commented 6 months ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Current behavior

My application does not use Tailwind. When updating to the new version, I have this error. What should I do?

ERROR in ./node_modules/tw-colors/dist/lib/index.mjs 3:0-40
Module not found: Error: Can't resolve 'tailwindcss/plugin' in '/home/semaphore/facil123/node_modules/tw-colors/dist/lib'
resolve 'tailwindcss/plugin' in '/home/semaphore/facil123/node_modules/tw-colors/dist/lib'
  Parsed request is a module
  using description file: /home/semaphore/facil123/node_modules/tw-colors/package.json (relative path: ./dist/lib)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      /home/semaphore/facil123/node_modules/tw-colors/dist/lib/node_modules doesn't exist or is not a directory
      /home/semaphore/facil123/node_modules/tw-colors/dist/node_modules doesn't exist or is not a directory
      /home/semaphore/facil123/node_modules/tw-colors/node_modules doesn't exist or is not a directory
      /home/semaphore/facil123/node_modules/node_modules doesn't exist or is not a directory
      looking for modules in /home/semaphore/facil123/node_modules
        /home/semaphore/facil123/node_modules/tailwindcss doesn't exist
      /home/semaphore/node_modules doesn't exist or is not a directory
      /home/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
 @ ./node_modules/reablocks/dist/index.js 27:0-41 8006:4-16
 @ ./node_modules/reaflow/dist/index.js 15:0-48 1312:102-114 1314:10-22 1330:10-22 1589:56-68 1590:111-123 1591:101-113 1593:10-22 1612:14-26 1635:39-51 1689:13-18 1728:35-47 1758:87-99 1790:43-55 1795:18-30 1810:105-117 1823:121-133
 @ ./app/javascript/packs/application.jsx 115:0-42 131:38-47
webpack 5.91.0 compiled with 1 error

Minimal reproduction of the problem with instructions

npm install with reflow at my package.json.


Libs:
- react version: "18.2.0"

For Tooling issues:
- Node version: 20.11.0
- Platform:  Mac, Linux

ghsteff commented 6 months ago

Thanks for reporting. I made a fresh with repo with $ npm create vite@latest, reaflow@5.2.10, and node 20.11.0, and couldn't reproduce this.

Would you mind providing a repo that reproduces the issue? Thanks

marcosdemelo commented 6 months ago

Thanks for reporting. I made a fresh with repo with $ npm create vite@latest, reaflow@5.2.10, and node 20.11.0, and couldn't reproduce this.

Would you mind providing a repo that reproduces the issue? Thanks

Here you will be able to do a fork and in the terminal, run npm run dev.

https://codesandbox.io/p/devbox/naughty-cohen-fjjfqc?file=%2Fapp%2Findex.jsx

ghsteff commented 6 months ago

This should be fixed in 5.2.11