psychopy.org | Reference | Downloads | Github

Error message when trying to import PsychoJS library in .html file

I am trying to import the PsychoJS library (or parts of it, at least) into a .html file for a Javascript program that I want to start creating. However, I am having a lot of difficulty doing so.

I tried a few things but was running into problems, and one suggestion around this problem was to try and run my program on a localhost. So I installed Apache do to so, but received this error message ( Loading module from “http://localhost/js/core/MinimalStim” was blocked because of a disallowed MIME type (“text/html”). Loading failed for the module with source “http://localhost/js/core/MinimalStim )

Someone suggested it could be a port problem. So I tried changing the port values in the .CONF files of Apache so that unused port were used, and also changed the ports used in the XAMPP control panel, but when I do this, I get this error message in the XAMPP control panel when trying to start APACHE through that: "Problem detected! 11:30:39 PM [Apache] Port 8081 in use by ““C:\Apache24\bin\httpd.exe” -k runservice” with PID 15100! ." However, I don’t understand how this error message is possible because Port 8081 was what I changed the port number in the Apache .CONF files to because Port 8081 wasn’t being used by anything (according to the Resource Monitor in the Task manager). Also, since doing all this, nothing appears in the console anymore and on the browser page I am now getting the “Unable to connect” message when it come to the local host.

@Visal, take a look at the response here. You should be able to run the task locally by using the local debug button from the Runner (see recent version of PsychoPy). Note, for local debug to work, you have to have already created your Pavlovia project through Builder, and have exported your HTML and JS without errors.