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.

Help with typescript module resolution

See original GitHub issue

This is a help request.

I’m working on project where I’m using Typescript for the entire app (not just the front end). When I attempt import { app } from 'electron', typescript claims not to find the electron module, which is not installed by the electron-forge init command. I can probably fix this by pointing “paths” under “compilerOptions” in my tsconfig file to another module in my node_modules folder, but I can’t find the correct one.

I would appreciate some help.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
anaisbettscommented, Sep 29, 2017

It’s not a bug, the reason that it’s not being hoisted is that both electron-prebuilt-compile and electron both define a binary electron. We probably need to copy electron.d.ts

0reactions
galvesribeirocommented, Sep 29, 2017

Just installed and tried yarn… It just worked.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TSConfig Option: moduleResolution - TypeScript
How this setting affects your build.
Read more >
Common TypeScript module problems and how to solve them
Enabling the compiler module resolution tracing in TypeScript can provide insight in diagnosing and solving problems.
Read more >
Typescript module resolution not working - Stack Overflow
What is your builder ? · You could provide --traceResolution to typescript compiler in order to see why your module is not resolved....
Read more >
Configuring Module Resolution On Typescript and Jest
Configuring Module Resolution On Typescript and Jest · Step 1: Setting up a basic service. · Step 2: Configuring path resolution on tsconfig.js...
Read more >
"moduleResolution": "node" usage and absolute/relative imports
node module resolution mimics the way how node looks for modules in runtime (resolution algorithm can be found here). In your case name...
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