Answer the question
In order to leave comments, you need to log in
Module request from node_modules?
I want to connect the progress bar module, downloaded via npm to node_modules. After that, he pointed to and wrote a small script in his script, but the browser replied that he could not find the desired variable that was specified in the module. Found out on the forumsvar ProgressBar = require('progressbar.js')
This is because require() doesn't exist in JavaScript on the browser/client side.I decided to try just cloning the module to my folder and just register it in , but in this case, my script does not understand at all what I want from it. How can I use the module?
<head>
Answer the question
In order to leave comments, you need to log in
Perhaps this is not the same module, but in a different one...
https://progressbarjs.readthedocs.io/en/latest/
// If you aren't using any module loader, progressbar.js exposes
// global variable: window.ProgressBar
var line = new ProgressBar.Line('#container');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question