-
Notifications
You must be signed in to change notification settings - Fork 40
Next.js: Error: Cannot find module '@tailwindcss/jit' #40
Comments
Can you include a GitHub repo that reproduces the issue? My first guess is just something weird happening with the installation, would try blowing out node_modules and double checking the package is really in your package.json for sure and reinstalling. |
I had a look at |
I'm also getting compile error in the Next.js project after following the instructions, Was eager to try it out, maybe I need to wait for a little more :)
|
I couldn't get this to work with NextJS either; getting a |
@will-stone It doesn't fix for me. My Error was
|
Is your path to your styles correctly imported in _app? The log message you showed looks like it’s using “.” instead of “..” |
@will-stone It works when I change I did try with a fresh create-next-app on my Windows + Node 14.16.0. But I got the same error. |
Having the same issue |
Can someone provide a reproduction? Impossible to find out the cause without a reproduction. |
Seems like you ran into the same issue #78 (comment) |
Thanks @mrdarkside Yes, my issue was because of space in folder name as per #78 & #22 |
looks like this requires |
may also be some related issues due to PostCSS compatibility (noted in readme, but not a high priority atm), read more here: https://tailwindcss.com/docs/installation#post-css-7-compatibility-build |
I run into the same issue, I added a repo that gives this error Repo: https://github.com/littleiffel/tailwind-jit-nextjs Node version is v14.16.0 & running Windows with WSL2 Full Error Stacktrace
|
@littleiffel your config file is not valid. Change this: module.exports = {
purge: ["./pages/**/*.{js,ts,jsx,tsx}", "./components/**/*.{js,ts,jsx,tsx}"],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: {},
}; to: module.exports = {
purge: ["./pages/**/*.{js,ts,jsx,tsx}", "./components/**/*.{js,ts,jsx,tsx}"],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [], // <-- is array
}; |
@cenguidanos Wow thanks a lot, yes that was the problem, i generated the config via My mistake, guess i confused postcss.config file and tailwind...But I can confirm that this solves the problem I updated the repo with the fix |
I'm running Next.js in a Docker container mounted to my project directory. I get the message:
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
, but I get the errorError: Cannot find module '@tailwindcss/jit'
right after. The latest versions of @tailwindcss/jit, tailwindcss, postcss, and autoprefixer are installed as dependencies.PostCSS config:
Full Error
The text was updated successfully, but these errors were encountered: