Title: After updating to v22.12, always got ReferenceError: require is not defined in tailwind config · Issue #56140 · nodejs/node · GitHub
Open Graph Title: After updating to v22.12, always got ReferenceError: require is not defined in tailwind config · Issue #56140 · nodejs/node
X Title: After updating to v22.12, always got ReferenceError: require is not defined in tailwind config · Issue #56140 · nodejs/node
Description: Version v22.12.0 Platform Darwin Satriadhikaras-MacBook-Pro.local 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:11 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6020 arm64 Subsystem No response What steps will reproduce the bug?...
Open Graph Description: Version v22.12.0 Platform Darwin Satriadhikaras-MacBook-Pro.local 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:11 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6020 arm64 Subsystem No res...
X Description: Version v22.12.0 Platform Darwin Satriadhikaras-MacBook-Pro.local 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:11 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6020 arm64 Subsystem No res...
Opengraph URL: https://github.com/nodejs/node/issues/56140
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"After updating to v22.12, always got ReferenceError: require is not defined in tailwind config","articleBody":"### Version\n\nv22.12.0\n\n### Platform\n\n```text\nDarwin Satriadhikaras-MacBook-Pro.local 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:11 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6020 arm64\n```\n\n\n### Subsystem\n\n_No response_\n\n### What steps will reproduce the bug?\n\nnpm run build on vite project that has already setup tailwindcss and shadcnui\n\n### How often does it reproduce? Is there a required condition?\n\nalways\n\n### What is the expected behavior? Why is that the expected behavior?\n\nbuild succeded\n\n### What do you see instead?\n\n$ tsc -b \u0026\u0026 vite build\r\n\r\n♻️ Generating routes...\r\n✅ Processed routes in 285ms\r\nvite v6.0.0 building for production...\r\ntransforming (1) src/main.tsxfile:///Users/......./tailwind.config.js:74\r\n plugins: [require(\"tailwindcss-animate\")],\r\n ^\r\n\r\nReferenceError: require is not defined\r\n at file:///Users/......./tailwind.config.js:74:11\r\n at ModuleJobSync.runSync (node:internal/modules/esm/module_job:395:35)\r\n at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:329:47)\r\n at loadESMFromCJS (node:internal/modules/cjs/loader:1414:24)\r\n at Module._compile (node:internal/modules/cjs/loader:1547:5)\r\n at Object..js (node:internal/modules/cjs/loader:1677:16)\r\n at Module.load (node:internal/modules/cjs/loader:1318:32)\r\n at Function._load (node:internal/modules/cjs/loader:1128:12)\r\n at TracingChannel.traceSync (node:diagnostics_channel:322:14)\r\n at wrapModuleLoad (node:internal/modules/cjs/loader:219:24)\r\n\r\nNode.js v22.12.0\n\n### Additional information\n\ni found this bug when i deploy it to vercel, but in my local it succeded built. and when i checked the node version of vercel it use v22.12.0, and at the time in my local i use v22.11.0. so when i update to the v22.12.0, it has the same error as vercel's build log. so i think the error is from v22.12.0","author":{"url":"https://github.com/satriadhikara","@type":"Person","name":"satriadhikara"},"datePublished":"2024-12-05T03:02:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/56140/node/issues/56140"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b5df5f4d-f88e-89a2-6468-fbc793160d92 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B54E:1DEA4C:ECE257:F2206C:6A4DC453 |
| html-safe-nonce | 218917f4b46ad7686472c67752c7bcb21db29fc2a0edf3d14deb2f4e20d741e8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTRFOjFERUE0QzpFQ0UyNTc6RjIyMDZDOjZBNERDNDUzIiwidmlzaXRvcl9pZCI6IjUyMjgzNzUyMzU3OTk5MjU4NDMiLCJyZWdpb25fZWRnZSI6InNlYSIsInJlZ2lvbl9yZW5kZXIiOiJzZWEifQ== |
| visitor-hmac | e875d107bd9d1a94b6a857506264fa1e01eb035e0a9ab6fff8edf5e2044fd372 |
| hovercard-subject-tag | issue:2719197695 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/56140/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8aa0a8cdf24087ec419bdc434cc0c59dd2fccfa8df7e854755026e3aca987de5/nodejs/node/issues/56140 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8aa0a8cdf24087ec419bdc434cc0c59dd2fccfa8df7e854755026e3aca987de5/nodejs/node/issues/56140 |
| og:image:alt | Version v22.12.0 Platform Darwin Satriadhikaras-MacBook-Pro.local 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:11 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6020 arm64 Subsystem No res... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | satriadhikara |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width