tailwindcss icon indicating copy to clipboard operation
tailwindcss copied to clipboard

Cannot access the application: defu__WEBPACK_IMPORTED_MODULE_3__ is not a function

Open gpoussel opened this issue 2 years ago • 8 comments

Version

@nuxtjs/tailwindcss: v5.1.2 nuxt: v2.15.8

Reproduction Link

https://codesandbox.io/s/tailwindcss-module-issue-defu-jqhlf6

It is working fine with @nuxtjs/tailwindcss v5.0.4. Another user seems to get the same error, as seen on StackOverflow: https://stackoverflow.com/questions/72409854/defu-webpack-imported-module-3-is-not-a-function-nuxt-auth

Steps to reproduce

  • Add @nuxtjs/auth-next dependency (version 5.0.0-1648802546.c9880dc)
  • Configure strategies in nuxt.config.js
  • Run dev server and open Nuxt application in the browser

What is Expected?

  • Application is running properly

What is actually happening?

  • Getting an error message: defu__WEBPACK_IMPORTED_MODULE_3__ is not a function

gpoussel avatar Jun 18 '22 12:06 gpoussel

Getting the same error while installing @nuxt/content to an existing project.

neelrr1 avatar Jun 19 '22 05:06 neelrr1

Same here on my project. I am also adding @nuxt/content to an existing project.

Unieveth avatar Jun 19 '22 07:06 Unieveth

I think I fixed it in the short term. You can install an older version with the command yarn add @nuxt/[email protected] as the current install command installs a version of @nuxt/content that requires 3.0.0-rc.3 and I'm using Nuxt 2

I opened a issue on the Nuxt content repo here: https://github.com/nuxt/content/issues/1270

Unieveth avatar Jun 19 '22 07:06 Unieveth

I also have the same problem with @nuxtjs/auth-next. I did what @Unieveth said and installed version 4.9.1. It did work but I still hope this will be fixed soon.

rbantug avatar Jun 21 '22 19:06 rbantug

I also have the same problem with @nuxtjs/auth-next. I did what @Unieveth said and installed version 4.9.1. It did work but I still hope this will be fixed soon.

Same situation here. Reverted to V4

PlusA2M avatar Jul 05 '22 17:07 PlusA2M

any update here? I am not using nuxt content... and am experiencing this error

image

simonmaass avatar Aug 17 '22 08:08 simonmaass

Any update on this?

clcoco avatar Aug 30 '22 08:08 clcoco

It seems to be a Problem with webpack and or the package defu. I've solved it by installing defu in version 5.0.1.

okaufmann avatar Sep 14 '22 15:09 okaufmann

same issue! This problem occurs after project initialization.

Nuxt 2 + Typescript + tailwindCSS + chakraUI + yarn + Nuxt Content

$ nuxt

 FATAL  defu is not a function                                                                                                                          

  at ModuleContainer.module.exports (node_modules/@chakra-ui/nuxt/lib/module.js:20:32)
  at ModuleContainer.addModule (node_modules/@nuxt/core/dist/core.js:239:34)
  at node_modules/@nuxt/utils/dist/utils.js:639:43
  at async ModuleContainer.ready (node_modules/@nuxt/core/dist/core.js:55:5)
  at async Nuxt._init (node_modules/@nuxt/core/dist/core.js:478:5)

chwan97 avatar Oct 08 '22 08:10 chwan97

Still no fix by nuxt?

clcoco avatar Nov 04 '22 08:11 clcoco

In nuxt.config.js add:

build: {
  transpile: [
    'defu'
  ]
}

as seen on StackOverflow: https://stackoverflow.com/questions/72414023/defu-webpack-imported-module-3-is-not-a-function

ronger-x avatar Mar 07 '23 07:03 ronger-x

Closing this issue as it is believed to be resolved/stale now - please feel free to comment if it is still an issue in the latest version of the module.

ineshbose avatar May 10 '23 22:05 ineshbose

We're facing this same issue with nuxt 2.17.0

defu__WEBPACK_IMPORTED_MODULE_3__ is not a function

abdullahtariq1171 avatar Jul 17 '23 13:07 abdullahtariq1171

how can i solve this problem

Akgurban avatar Oct 09 '23 11:10 Akgurban

I solved it by this

In nuxt.config.js add:

build: {
  transpile: [
    'defu'
  ]
}

as seen on StackOverflow: https://stackoverflow.com/questions/72414023/defu-webpack-imported-module-3-is-not-a-function

kossa avatar Nov 01 '23 11:11 kossa