tailwindcss: Dependencies broken : SyntaxError: The requested module '@nuxt/kit' does not provide an export named 'addDevServerHandler'
Version
@nuxtjs/tailwindcss: 5.0.4 nuxt: 2.15.8
Steps to reproduce
Moving from 5.0.3 to 5.0.4 give me the following error : SyntaxError: The requested module '@nuxt/kit' does not provide an export named 'addDevServerHandler'
It seems due to the @nuxt/kit dependencie update, in 5.04, from npm:@nuxt/kit-edge@latest to ^3.0.0-rc.2
The strangest thing is that error come from the node_modules/@nuxtjs/tailwindcss/dist/module.mjs file, which indeed import addDevServerHandler from @nuxt/kit and … declare these consts on top of the file :
const name = "@nuxtjs/tailwindcss";
const version = "5.1.2";
It’s like if the dist/module.mjs which was packaged was the wrong one ; maybe you should just re-package the 5.0.4 ?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (1 by maintainers)
That workaround is indeed working 👍
adding an empty array named devServerHandlers to nuxt.config file will solve the issue.
devServerHandlers: [],5.1.2 is compatible with Nuxt 2, but you have to add
devServerHandlers: []in nuxt.config file.The wrong exact version was due to an error from me : I have
"@nuxtjs/tailwindcss": "^5.0.4"in my dependencies, so indeed, it’s allowing the patch and minors updates, like5.1.*versions.Fixing the dependencie version to
"@nuxtjs/tailwindcss": "~5.0.4"avoid that, and it’s working well in 5.0.4But … in practice, as we can see : 5.0.* is compatible with nuxt2 and nuxt3 5.1.* is not anymore compatible with nuxt2 due to the bump to @nuxt/kit 3.0.0-rc.3
So, as a breaking change, should this be fixed in 5.1 and only released in 6.* ?