Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: convert tailwind to esm #804

Merged
merged 1 commit into from
Dec 10, 2024
Merged

fix: convert tailwind to esm #804

merged 1 commit into from
Dec 10, 2024

Conversation

cstenglein
Copy link
Collaborator

npm run dev is somehow not working.

Converting to esm seems to work

file:///home/christophs/src/projects/raspiblitz-web/tailwind.config.js:1
const { nextui } = require("@nextui-org/react");
                   ^

ReferenceError: require is not defined
    at file:///home/christophs/src/projects/raspiblitz-web/tailwind.config.js:1:20

@cstenglein cstenglein requested a review from escapedcat December 9, 2024 19:51
@escapedcat
Copy link
Collaborator

escapedcat commented Dec 9, 2024

Didn't notice this so far. Is this related to a change or to a different mode version, or...?
Did it break somewhere?

@cstenglein
Copy link
Collaborator Author

Yes, can not use npm run dev or npm run dev:local without that fix. Does the master branch work for you?

node version is 22.12.0

@escapedcat
Copy link
Collaborator

escapedcat commented Dec 10, 2024

Both working for me x_X

node -v
v22.12.0
npm run dev

> raspiblitz-web@1.4.0-dev dev
> npm run start


> raspiblitz-web@1.4.0-dev start
> vite


  VITE v5.4.8  ready in 218 ms

  ➜  Local:   http://localhost:3000/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
npm run dev:local

> raspiblitz-web@1.4.0-dev dev:local
> concurrently "npm run backend" "npm run start"

[0]
[0] > raspiblitz-web@1.4.0-dev backend
[0] > npm start --prefix ./backend-mock
[0]
[1]
[1] > raspiblitz-web@1.4.0-dev start
[1] > vite
[1]
[0]
[0] > backend-mock@1.0.0 start
[0] > node --watch index.js
[0]
[1]
[1]   VITE v5.4.8  ready in 225 ms
[1]
[1]   ➜  Local:   http://localhost:3000/
[1]   ➜  Network: use --host to expose
[0] Server listening on http://localhost:8000

Hm, weird... Can't really explain. Did you try rm -rf node_modules 🙈

Edit: 22.11.0 works, 22.12.0 does not (needed to load the page)

@cstenglein cstenglein merged commit efbe4cd into master Dec 10, 2024
2 checks passed
@cstenglein cstenglein deleted the fix-tailwind branch December 10, 2024 18:09
cstenglein added a commit that referenced this pull request Dec 19, 2024
(cherry picked from commit efbe4cd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants