koii-network / ezsandbox

The best place to get started with all things decentralized
47 stars 21 forks source link

Lesson 2 Error - basePath is not defined in catch clause of storeFile.js #92

Closed eastmaels closed 1 month ago

eastmaels commented 2 months ago

Steps to replicate:

## How to Setup

1. Clone this repo
2. cd to Lesson 2, file-sharing after directory
    * example: cd Lesson 2/file-sharing/after 
4. Run `npm install`
5. Run `npm test`

The following error occurs (an exception should occur inside the try{..} block:

Submissions from last round:  [ 'FdgKNL6KousnDB8MyHzhqW67rS7BSz8guHYtGds8NiPD' ] [ { submission_value: null, slot: 100, round: 0 } ] 1
...
ERROR IN EXECUTING TASK ReferenceError: basePath is not defined
    at storeFile (/Users/east/workspace/koii/ezsandbox_orig/Lesson 2/file-sharing/after/task/fileUtils/storeFile.js:26:22)
    at async Submission.task (/Users/east/workspace/koii/ezsandbox_orig/Lesson 2/file-sharing/after/task/submission.js:14:19)
    at async CoreLogic.task (/Users/east/workspace/koii/ezsandbox_orig/Lesson 2/file-sharing/after/coreLogic.js:6:20)
    at async executeTasks (/Users/east/workspace/koii/ezsandbox_orig/Lesson 2/file-sharing/after/tests/unitTest.js:12:9)