G
G
Gleb Lukashonok2020-10-01 23:03:06
Node.js
Gleb Lukashonok, 2020-10-01 23:03:06

How to properly export a module/library?

Hello!
I want to make an application on Electron. Here is the project structure:
5f7633f89c8f7899085539.png
The application calls the index.html file. To which backup.js is connected...
But in dev tools I get the following:

Uncaught ReferenceError: require is not defined at backup.js:1

And in this line: This library is vital for my script to cook under the hood of my application. How to make it work? How to load this library correctly?
var win = require("win-service");

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question