Async-lock: process is not defined

I’m new in javascript and ionic, I got “process is not defined” when use this module, is there any solutions for this? or any other module to handle this? thanks in advance

Especially because you say this, I think that by far the best course of action here is to forget that this module exists, immediately abandon any attempt to find or use any other module with similar goals, and if necessary make a separate thread describing whatever trouble you ran into that triggered your journey into this minefield in the first place.

Asynchronous JavaScript is not particularly intuitive, but it is an absolutely critical part of writing Ionic apps (or any other web app). Web apps at their core are cooperatively multitasked and event-driven. They respond to stimuli, whether from the user or from some other sort of external source (like a network connection). The RxJS library (official docs here, another good resource here) will really help you here, but I would urge you to avoid anything like this async-lock that purports to facilitate persisting with an imperative programming in an Ionic app. Write reactive code and the framework will work with you.

1 Like