Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Unit Testing Behavior Driven Development with Mocha & Chai General Structure of Test Files

getting error on running npm test command in workspace

I am getting below error on running npm test command in workspace "After installing mocha and chai and creating test folder". treehouse:~/workspace$ npm test

workspace@1.0.0 test /home/treehouse/workspace
mocha

/home/treehouse/workspace/node_modules/yargs-parser/build/index.cjs:991
throw Error(yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions);
^

Error: yargs parser supports a minimum Node.js version of 10. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions
at Object.<anonymous> (/home/treehouse/workspace/node_modules/yargs-parser/build/index.cjs:991:15)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/treehouse/workspace/node_modules/mocha/lib/cli/options.js:12:21)
at Module._compile (module.js:653:30)
npm ERR! Test failed. See above for more details.

1 Answer

Alex Hort-Francis
Alex Hort-Francis
17,074 Points

The version of Node running in the Workspace for this project seems to be v8.17.0