question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dependencies broken : SyntaxError: The requested module '@nuxt/kit' does not provide an export named 'addDevServerHandler'

See original GitHub issue

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 ?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
manniLcommented, Jun 15, 2022

adding an empty array named devServerHandlers to nuxt.config file will solve the issue.

devServerHandlers: [],

That workaround is indeed working 👍

import tailwindTypography from '@tailwindcss/typography'

export default {
  buildModules: [
    '@nuxtjs/tailwindcss'
  ],
  devServerHandlers: [], // Workaround for https://github.com/nuxt-community/tailwindcss-module/issues/487
  tailwindcss: {
    config: {
      plugins: [tailwindTypography]
    }
  }
}
2reactions
kenanduman1988commented, Jun 7, 2022

adding an empty array named devServerHandlers to nuxt.config file will solve the issue.

devServerHandlers: [],

Read more comments on GitHub >

github_iconTop Results From Across the Web

SyntaxError: The requested module '@nuxt/kit' does not ...
Dependencies broken : SyntaxError: The requested module '@nuxt/kit' does not provide an export named 'addDevServerHandler' #487.
Read more >
42 - Stack Overflow
Uncaught SyntaxError: The requested module './add.js' does not provide an export named 'add' ; See the export default ? So it's a default...
Read more >
What am I missing about module exports? : r/learnjavascript
Uncaught SyntaxError: The requested module '/node_modules/axios/index.js' does not provide an export named 'default'.
Read more >
Dependencies broken : SyntaxError: The requested module '@nuxt ...
Dependencies broken : SyntaxError: The requested module '@nuxt/kit' does not provide an export named 'addDevServerHandler' · Issue · Version · Steps to reproduce....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found