Accepted answer

You're serving your static files out of your ./public directory under the same directory that app.js is in. Under that folder you need to have a js directory with d3.js under that. If you installed D3 from npm, then it will be in your <project root>/node_modules and you'll need to find the d3.js from there and copy it over. You can make build tasks do this with a ton of tools to automate it.

Make sure the file is in public/js and that it's correct. Then try again.

EDIT: To add to that, if you are checking your Network tab in dev tools and you aren't 404'ing this, go to the line that is asking for d3.js and click on it, then on the response tab. See what you do get, because that can say a lot about what is wrong.

EDIT #2: Could also be a typo in script(scr="") :)

Related Query