Injecting local script tag onto page
I'm trying to inject a few local .js files onto pages so they can do some tidying before I save the page HTML. Locally, it works well like this:
But when i try to run this on the apify platform, I get "No Such File Or Directory" errors. How can i reference files from my package on the apify platform so I can inject them into a page?
1 Reply
ambitious-aqua•12mo ago
Hi @kennysmithnanic,
I assume this is caused by the way your Dockerfile is setup - files that should be injected are not copied to the final image.
Adding something like this under the build command in your Dockerfile should help: