Closed alaadahmed closed 1 year ago
Deploy success when I remove these two 3rd party plugins from tailwind.config.js
I'm seeing an exit for a slightly different error resulting in a failure to build on an M1 device on Tailwind 3.0.24 in a new Phoenix 1.6.7 project:
❯ mix tailwind default
node:internal/modules/package_json_reader:4
const internalModuleReadJSON = function (f) { return require('fs').internalModuleReadJSON(f); };
^
TypeError: require(...).internalModuleReadJSON is not a function
at internalModuleReadJSON (node:internal/modules/package_json_reader:4:68)
at Object.read (node:internal/modules/package_json_reader:21:42)
at readPackage (node:internal/modules/cjs/loader:296:36)
at readPackageScope (node:internal/modules/cjs/loader:329:19)
at trySelf (node:internal/modules/cjs/loader:444:40)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:910:24)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at Module._preloadModules (node:internal/modules/cjs/loader:1276:12)
at loadPrelonode:internal/modules/package_json_reader:4
const internalModuleReadJSON = function (f) { return require('fs').internalModuleReadJSON(f); };
^
TypeError: require(...).internalModuleReadJSON is not a function
at internalModuleReadJSON (node:internal/modules/package_json_reader:4:68)
at Object.read (node:internal/modules/package_json_reader:21:42)
at readPackage (node:internal/modules/cjs/loader:296:36)
at readPackageScope (node:internal/modules/cjs/loader:329:19)
at trySelf (node:internal/modules/cjs/loader:444:40)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:910:24)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at Module._preloadModules (node:internal/modules/cjs/loader:1276:12)
at loadPreloadModules (node:internal/bootstrap/pre_execution:487:5)
** (Mix) `mix tailwind default` exited with 1
mix tailwind default
through Rosetta (x86) works as expected, doing this as a workaround
Yes, this package does not support third party plugins. Then you must use Tailwind from npm.
I don't know why I get this error?
I read in
README
here that if I needed to use 3rd party plugin forTailwind
then I need to install node, and I did that. Here is mypackage.json
file:I also thought to install
tailwindcss
itself as node package thinking this would help, that's why you will find it above in thepackage.json
file, but I also tried at first without installing it and just installed the only 2 3rd party plugins I neededtailwindcss-rtl
&tailwindcss-text-shadow
! But it seems mytailwind.config.js
doesn't feel these 3rd party plugins!!I get this error when I deploy to
Fly.io
, and this is my Dockerfile