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.

Cannot destructure property `addComponents` of 'undefined' or 'null'

See original GitHub issue

Parcel reports the following after adding tailwindcss-plugins/pagination to list.

🚨  assets/css/app.css:undefined:undefined: Cannot destructure property `addComponents` of 'undefined' or 'null'.
    at module.exports (assets/node_modules/tailwindcss-plugins/pagination/index.js:41:28)
    at Object.<anonymous> (assets/tailwind.config.js:9:46)
    at Module._compile (assets/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
    at Module.load (internal/modules/cjs/loader.js:628:32)
    at Function.Module._load (internal/modules/cjs/loader.js:555:12)
    at Module.require (internal/modules/cjs/loader.js:666:19)
    at require (assets/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at assets/node_modules/tailwindcss/lib/index.js:54:83
    at assets/node_modules/tailwindcss/lib/processTailwindFeatures.js:32:20

It looks like the offending line is where the exports is defined:

module.exports = function ({ addComponents, theme })

Could this be a version mismatch?

(using tailwindcss@1.0.4)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
slava-vishnyakovcommented, Oct 5, 2019

@lorisleiva I guess this needs updating too: https://lorisleiva.com/laravel-pagination-with-tailwindcss/

Right now following the instructions I get ‘theme is not a function’ error.

Thanks!

1reaction
bfolkenscommented, Jul 15, 2019

So as it turns out, doing the following works too (without the trailing ()):

plugins: [
  require('tailwindcss-plugins/pagination')
]
Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot destructure property `logger` of 'undefined' or 'null ...
NPM script: "start": "webpack serve --open --config webpack.config.js",. Was trying the same on the latest versions, but didn't help ...
Read more >
Odoo 15 JavaScript Reference: OWL Views, Services, Hooks ...
Odoo 15 JavaScript Reference guide for OWL Views, the new WebClient, ES6 Modules, Hooks, Services registry, new Models, Layout Component, ...
Read more >
TypeError: Cannot destructure property 'interface' of 'require ...
compile'); ^ TypeError: Cannot destructure property 'interface' of 'require(...)' as it is undefined. at Object.
Read more >
TypeError error when editing page - WordPress.org
Thanks, Marcos TypeError: Cannot destructure property 'setUsedPageOrPatternsModal' of '(0 , a.useDispatch)(...)' as it is null. at d ...
Read more >
Cannot destructure Property of Undefined Error in JS
To solve the error, provide a fallback of an empty object when destructuring, or set a default value for the parameter if using...
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