Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Durandal - View Not Found. Searched for "/" on intermittent

I wonder if anyone has had a similar problem with Durandal.js.

I am getting an intermittent "View Not Found. Searched for" error, which is hard to replicate as only happens very occasionally.

It appears to spawn from the file viewEngine.js when the createView function is unable to locate the view. However the view is present and works 99% of the time.

Anyone had similar issues, or know of a way in which I can track down and fix this issue?

Thanks.

like image 486
rjmacarthy Avatar asked Oct 20 '22 23:10

rjmacarthy


1 Answers

In my case it was require.js causing the problem.

In main.js add the following and add the waitSeconds parameter:

require.config({
    waitSeconds : 0
});

This prevents require.js from timing out when trying to load files.

http://requirejs.org/docs/api.html#config-waitSeconds

like image 153
rjmacarthy Avatar answered Jan 02 '23 19:01

rjmacarthy