When I start my app using node app.js
then then I get the following error:
/home/ubuntu/workspace/nodeapp/node_modules/particles.js/particles.js:142
This is because window
is a browser object, and it looks like you're trying to load particle.js on the server side, in node.
Try moving your particlesJS.load
call into the browser.
From their npm page:
Initialize the plugin on the window.onload event.
window.onload = function() {
Particles.init({
selector: '.background'
});
};