Answer the question
In order to leave comments, you need to log in
How can I output a variable to another file?
Good afternoon, I'm doing a project on node js, express, handlebars. Faced a problem with exporting a variable to another file that is connected to the html page.
This writes if connected via module exports and require - Uncaught ReferenceError: require is not defined at main.js
: then I doubt it very much, since everything is written correctly, like
export let a = 1
import {a} from '../database/itemsSelect'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question