I keep getting this error when I shouldn’t be when I use
Learn TDD with Mocha | Codecademy
$ npm test shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory path.js:1142 cwd = process.cwd(); ^ Error: ENOENT: no such file or directory, uv_cwd at Object.resolve (path.js:1142:25) at Function.Module._resolveLookupPaths (module.js:391:17) at Function.Module._resolveFilename (module.js:461:31) at Function.Module._load (module.js:418:25) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at /usr/lib/node_modules/npm/bin/npm-cli.js:19:21 at Object.<anonymous> (/usr/lib/node_modules/npm/bin/npm-cli.js:79:3) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10)
The instructions say:
Calculate object, add a
.sum() method that takes one argument.
Run the test suite again in the terminal. You should now get an
Check your work.
AssertionError in the terminal by making
.sum() return the same value as the expected result you defined in your test.
Run the test suite. Your test should pass!
Check your work."
I completed all the tasks and there was never an
AssertionError I only got the error in the code I copied and pasted above so I am not able to see the tests… It was working momentarily on step 2 but the following
npm tests were all receiving this
Error: ENOENT: no such file or directory, uv_cwd error and I tried refreshing the page etc.