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 import `custom-electron-titlebar/main` using TypeScript's `import`

See original GitHub issue

I can’t import something from custom-electron-titlebar/main using TypeScript’s import

import { setupTitlebar, attachTitlebarToWindow } from "custom-electron-titlebar/main";
Cannot find module 'custom-electron-titlebar/main' or its corresponding type declarations.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
ErrorGamer2000commented, Jul 22, 2022

The package is missing dist/main.d.ts. Temporary fix is to put this in a .d.ts:

import type cetMain from "custom-electron-titlebar/dist/main/main";

declare module "custom-electron-titlebar/main" {
  const exports: cetMain;
  export default exports;
}
1reaction
DerGooglercommented, Jun 1, 2022

import it’s not from TypeScript. It’s from ES6-Syntax.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot import `custom-electron-titlebar/main` using ... - GitHub
I can't import something from custom-electron-titlebar/main using TypeScript's import import { setupTitlebar, attachTitlebarToWindow } from ...
Read more >
Typescript: Cannot use import statement outside a module
19) app with importing node-module without default export. I use this construction: import { Class } from 'abc'; When i run the code,...
Read more >
Documentation - Modules - TypeScript
exported from a different module, it has to be imported using one of the import forms. Modules are declarative; the relationships between modules...
Read more >
Cannot use import statement outside a module [React ...
This error might be raised when using either JavaScript or TypeScript in the back-end. So you could be working on the client side...
Read more >
Auto import | WebStorm Documentation - JetBrains
In JavaScript and TypeScript files, WebStorm automatically adds import statements for modules, classes, components, and any other symbols ...
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