Intermediate Javascript Promises Section 10/11 Has Error

Link to affected lesson:

When testing the code from exercise 10/11 in the promise section of intermediate javascript, the provided terminal always errors out with the folllowing:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
cwd = process.cwd();
Error: ENOENT: no such file or directory, uv_cwd
at Object.resolve (path.js:1142:25)
at startup (bootstrap_node.js:129:32)
at bootstrap_node.js:542:3

My code, which I believe is correct:

let checkSunglasses = checkAvailability(‘sunglasses’,‘Favorite Supply Co.’);
let checkPants = checkAvailability(‘pants’,‘Favorite Supply Co.’);
let checkBags = checkAvailability(‘bags’,‘Favorite Supply Co.’);
Promise.all([checkSunglasses, checkPants, checkBags])

Does the error still happen if you refresh the page immediately before pressing run? When a lesson window is open for a while, things can start going wrong on the backend. A refresh usually helps.

1 Like

I found 2 ways to fix it actually.

  1. Refresh the page and start over
  2. “cd …”, “ls” to find the directory for the assignment, “cd [dir]”
1 Like