0

This is I'm sure a simple question but I'm struggling to find the answer with my limited knowledge of node.js environments.

I've got a Heroku hosted project built in node.js. I've got an index.js file that serves the index.html file to the client.

How do I include the file "pixi-display.js" in the HTML file so that I can use it on my client side code? Right now I can't even load it in my local environment.

Yertle
  • 21
  • 6
  • Did you include it as a dependency? If so, you should just be able to use it like you would locally. – ChrisGPT was on strike Mar 15 '19 at 22:52
  • Part of the issue is that the current version of pixi-display is only available on https://github.com/pixijs/pixi-display and the one in npm is old. What I did was replace the bin dist of pixi-display.js in the npm_modules/ subfolder with the dist listed in the github link. – Yertle Mar 16 '19 at 00:01
  • You shouldn't be manually putting things into `node_modules/` under any circumstances (locally, on Heroku, in development, and _**certainly**_ not in production). If you need to install from GitHub you [can do that with `npm`](https://docs.npmjs.com/cli/install.html) or [with `yarn`](https://yarnpkg.com/lang/en/docs/cli/add/). See https://stackoverflow.com/q/17509669/354577 – ChrisGPT was on strike Mar 16 '19 at 00:13

0 Answers0