electron / electron/fiddle

modules (dependencies) don't work: Error: Cannot find module

Open
#1,519 5 comments 0 reactions 0 assignees View on GitHub
:beetle: bug :question: more-information-needed area:packages
Dominant language
TypeScript
Stars
7.8k
Forks
762
Avg merge
15h 27m
Merged PRs (30d)
12

Description

My first fiddle attempt.

I wanted to create a fiddle to report a bug with robotjs, but I get this error even though I specified the dependency:

![image](https://github.com/electron/fiddle/assets/2086493/cd8d0cdb-a2af-42df-996f-4d8454386714)

```
App threw an error during load
Error: Cannot find module '@jitsi/robotjs'
Require stack:
- /tmp/electron-fiddle-90379-VDHq4ptMJ80k/main.js
- /home/myname/.config/Electron Fiddle/electron-bin/current/resources/default_app.asar/main.js
```

https://gist.github.com/ryancwalsh/0867273c6c0199b55d2a314525f61f63

What am I doing wrong?

I'm on Ubuntu.

Thanks!!

P.S. Is there a way to use TypeScript (and `import` instead of `require`)? It's kind of a hassle to translate my code into old JavaScript.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.