# Index file for online experiment references missing 'Lib' folder containing JavaScript modules

**URL:** <https://discourse.psychopy.org/t/index-file-for-online-experiment-references-missing-lib-folder-containing-javascript-modules/27592>\
**Category:** Online experiments\
**Created:** [February 22, 2022, 11:57pm UTC](https://discourse.psychopy.org/t/index-file-for-online-experiment-references-missing-lib-folder-containing-javascript-modules/27592 "2022-02-22T23:57:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jww709](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@jww709](https://discourse.psychopy.org/u/jww709)\
**Post date:** [February 22, 2022, 11:57pm UTC](https://discourse.psychopy.org/t/index-file-for-online-experiment-references-missing-lib-folder-containing-javascript-modules/27592/1 "2022-02-22T23:57:38Z")

</div>

URL of experiment: [Sign in · GitLab](https://gitlab.pavlovia.org/jed709/test-2)

Description of the problem: Hello all,

I will preface this by saying that the experiment in question was originally written in Python using PsychoPy builder and subsequently converted to JavaScript in order to run it online. This experiment runs as it should in Pavlovia (pilots as it should, at least) and has not given me any trouble until I started trying to get it to run on a private server.

I’ve been trying to get an online experiment up and running on a private server connected to my institution and have been running into a problem. The experiment will not start (there is just a blank screen), and the developer console displays this error:

 ![online-paradigm-error](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/7/e/7ecb5dbb0d78f14847ca566058bffe11d094ca04.png)

This appears to reflect the fact that the experiment’s ‘index.html’ file references a ‘Lib’ folder that does not exist in the directory created by PsychoPy when saving the experiment. The folder is referenced only once, as far as I can tell, in line 5 of ‘index.html’:

`import { core, data, sound, util, visual } from './lib/psychojs-2021.2.3.js';`

The issue here is that I cannot find this file (or exact folder) in PsychoPy’s program files, or anywhere else. I _can_ find JavaScript files corresponding to all the relevant exports from that line (i.e., core.js, data.js, etc.) but there is no trace of ‘psychojs-2021.2.3.js’. So, how might I go about solving this? Can I download the ‘Lib’ folder in question? Presumably it exists somewhere as the experiment functions as it is supposed to on Pavlovia. If not, would there be a way to rewrite this line of code to use the core.js (and so on) files, which I could put in a directory within the experiment, rather than the file being referenced?

I apologize if any of these are silly questions - I have limited knowledge about coding with JavaScript, but I could not find anything like this elsewhere on the forums. I’ve made the Gitlab repository available internally, so everyone should be able to view it when signed in. If anyone has any suggestions about what to do here, I would really appreciate it!

Thank you

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [February 24, 2022, 11:20pm UTC](https://discourse.psychopy.org/t/index-file-for-online-experiment-references-missing-lib-folder-containing-javascript-modules/27592/2 "2022-02-24T23:20:56Z")

</div>

> [@jww709](#):
>
> until I started trying to get it to run on a private server.

If you need to run PsychoJS on your own server you will need to contact Open Science Tools to discuss local installation.

> [@Running Experiments on Own Server](https://discourse.psychopy.org/t/running-experiments-on-own-server/17052):
>
> Hi all, I am looking for resources that would help me setup and run experiments online on our own server. I have gone through many posts but couldn’t find good resources or get specific answer on whether it is possible or not. Please do share any resources or links that could help me.

---

<div class="post-metadata">

**Author:** ![jww709](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@jww709](https://discourse.psychopy.org/u/jww709)\
**Post date:** [March 2, 2022, 8:44pm UTC](https://discourse.psychopy.org/t/index-file-for-online-experiment-references-missing-lib-folder-containing-javascript-modules/27592/3 "2022-03-02T20:44:20Z")

</div>

Thanks for the reply!

Turns out all I needed to get the experiment working was to run it in local debug mode again - this generated the Lib folder with the appropriate resources and it works fine now!
