Looks like your error matches the one from this thread, but I see that you have already replied there.
I’m assuming Phil’s fix didn’t work for you.
I’m a bit out of my area of expertise here, but it looks like this is caused by a race condition in the initialization of project library scripts not by anything in your perspective view.
I’m not sure if it will help, but I would double check that you aren’t importing project library scripts within other project library scripts. If I am understanding the issue correctly though, this race condition will still occur from gateway events that run after the script module reinitializes without import statements.