I installed particles.js with: npm particles.js --save
Error: bundle.js:54 GET http://localhost:8080/particles.json 404 (Not Found)
I have tried different paths but it doesn't seem to work.
In the file app.js:
import 'particles.js/particles';
const particlesJS = window.particlesJS;
particlesJS.load('particles-js', 'particles.json', null);
Folderstructure:
- index.html
- src/js/app.js
- src/js/particles.json
try this:
import "particles.js";
particlesJS.load('container', 'particles.json', function () {
console.log('loaded');
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With