Louis DeconinckL
Apify & Crawleeβ€’2mo agoβ€’
1 reply
Louis Deconinck

Let us run PPE actors in development on Apify without providing pricing

I have my PPE actor ready and want to do a couple of test runs on Apify's platform to estimate the cost before publishing. At this moment I haven't yet defined pricing. I am always forced to remove the PPE pricing logic to do these runs. When I leave it in, I get this error:

/usr/src/app/node_modules/apify/charging.js:329const price = this.isAtHome ? this.pricingInfo[eventName].price : 1; // Use a nonzero price for local development so that the maximum budget can be reached
TypeError: Cannot read properties of undefined (reading 'price')
     at ChargingManager.calculateMaxEventChargeCountWithinLimit (/usr/src/app/node_modules/apify/charging.js:329:67)
     at file:///usr/src/app/dist/main.js:14:44
     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)


This is cumbersome as it requires me to rebuild the actor a couple fo times. I only get this error when running on Apify, not locally. Am I doing something wrong?
Was this page helpful?