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.

SyntaxError: Named export 'css' not found. (from esm import)

See original GitHub issue

import 'solid-styled-components' causes the following error from goober:

import { css, setup as gooberSetup } from "goober";
         ^^^
SyntaxError: Named export 'css' not found. The requested module 'goober' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'goober';
const { css, setup: gooberSetup } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:181:5)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
    at async Module.run (file:///home/brian/work/ctx-core/ctx-core/node_modules/.pnpm/uvu@0.5.2/node_modules/uvu/run/index.mjs:10:3)
    at async /home/brian/work/ctx-core/ctx-core/node_modules/.pnpm/uvu@0.5.2/node_modules/uvu/bin.js:26:5
 ELIFECYCLE  Command failed with exit code 1.
 ELIFECYCLE  Test failed. See above for more details.

See https://github.com/solidjs/solid-styled-components/issues/10

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
btakitacommented, Jan 13, 2022

@rschristian Thank you. I’m also getting successful builds.

0reactions
rschristiancommented, Jan 11, 2022

@btakita v2.1.5 was just published which should correct this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Named export 'Types' not found. The requested module ...
Named export 'Types' not found. The requested module 'mongoose' is a CommonJS module, which may not support all module.exports as named exports.
Read more >
Misleading error that module does not provide export #32137
You get this: SyntaxError: The requested module './dependency.cjs' does not provide an export named 'name' which is only "true" because ES ...
Read more >
export - JavaScript - MDN Web Docs
The export declaration is used to export values from a JavaScript module. Exported values can then be imported into other programs with the ......
Read more >
module-not-found - Next.js
A module not found error can occur for many different reasons: The module you're trying to import is not installed in your dependencies;...
Read more >
The requested module does not provide an export named in JS
The "Ucaught SyntaxError: The requested module does not provide an export named" occurs when mixing up default and named ES6 module imports and...
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