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.

Must use import to load ES Module

See original GitHub issue

Hi JakeNavith,

thank you for the plugin.

But I can not use it in my Project. I get this error

Tailwind CSS: Must use import to load ES Module: /Users/andre/Arbeit/Projekte/js/pointcloud-suite-gui/node_modules/tailwindcss-theme-variants/dist/index.mjs

I Use Tailwindcss 2.0.1.

Here my config file:

` const { themeVariants } = require(‘tailwindcss-theme-variants’);

module.exports = { // purge: [], purge: [‘./src/**/*.js’, ‘./public/index.html’], darkMode: false, // or ‘media’ or ‘class’ theme: { extend: { colors: { ‘my-color’: ‘#20607E’, }, }, }, variants: { extend: { backgroundColor: [‘foo’, ‘baa’], }, }, plugins: [ themeVariants({ themes: { vw: { selector: ‘.foo-theme’, }, audi: { selector: ‘.baa-theme’, }, }, }), ], }; `

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
JNavithcommented, Dec 23, 2020

Thanks for the report and information! This should be fixed in 1.10.0-beta.14

1reaction
JNavithcommented, Dec 16, 2020

I’m suspecting that I haven’t made this package work with webpack. (I don’t use webpack)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Importing in Node.js: error "Must use import to load ES Module"
You are using CommonJS right now with the .js extension. To import ES6 modules, you will have to change the extension of the...
Read more >
Error [ERR_REQUIRE_ESM]: Must use import to load ES ...
I just installed the library onto my TypeScript project and I get the following error: Error [ERR_REQUIRE_ESM]: Must use import to load ES...
Read more >
Must use import to load ES Module - Help - Pipedream
Hi, suddenly my workflow started to fail with the following error: “Must use import to load ES Module”. @germanescobar you can give this...
Read more >
Getting "must use import to load ES module" when using ...
My site is skyglass.netlify.app. I have a function that works locally with netlify dev. It requires node-fetch like this: const fetch ...
Read more >
ECMAScript modules | Node.js v19.3.0 Documentation
startup/index.js' ) must also be fully specified. This behavior matches how import ... Instead, use import() to load an ES module from a...
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