P5.play.js not working (animation, loadAnimation not defined)

I downloaded the p5 library from the package manager and it all seems to work, but it cant get the p5.play.js file, I’ve tried using 2 p5.play packages from NPM but they didn’t work, I also tried making a file “p5.play.js” in my root folder and linking to it in my index.html file, but it still won’t work


GET https://p5-dodo-game-base.glitch.me/p5.play.js net::ERR_ABORTED 404

What can I do to fix this? Any help would be appreciated!

Edit: This is happening in my project: p5-dodo-game-base

(I also have trouble linking the stylesheet in the HTML,

Refused to apply style from ‘https://p5-dodo-game-base.glitch.me/public/style.css’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Which default project are you using? you might have to make a route in express.

I’m using the hello-express project (the second one in the row)

1 Like

You have to add a route in your server.js, see https://expressjs.com/en/starter/static-files.html

1 Like