-
Notifications
You must be signed in to change notification settings - Fork 960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot get lesson 2 tests to initiate. #77
Comments
Exactly the same is happening to me. |
Try removing Branch: changes to be made in filename: Before: "scripts": { After: "scripts": { Please let me know if this doesn't work out! |
Please try the above fix, do let us know if this doesn't help you! |
Great, appreciate the help. Will check and feedback! |
@thenishantgiri Thanks for the help, it works! ✨ |
Updating Jest to the latest version fixed the issue for me. $npm remove jest |
I have installed yarn using
yarn install
and checked it was successful usingyarn version
. I then useyarn dev
within the CLI of visual studio, to build the project and start the server.I then try to run
yarn test-routes
to check my code against the test criteria (at this stage I haven't written any code, but I have the lesson 2 directory open in VS code, I just want to check the test is working), but receive the following error:'Connors-MBP:api-design-node-v3-lesson-2 connorflewitt$ yarn test-routes
yarn run v1.22.15
$ npm run test -t router
npm WARN lifecycle The node binary used for scripts is /var/folders/x1/mz8mq97502566d0vm7_148d40000gn/T/yarn--1634049615107-0.4726967466122134/node but npm is using /usr/local/bin/node itself. Use the --scripts-prepend-node-path option to include the path for the node binary npm was executed with.
sh: cross-env: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] test:
cross-env NODE_ENV=testing jest --forceExit --detectOpenHandles --silent "router"
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/connorflewitt/.npm/_logs/2021-10-12T14_40_15_531Z-debug.log
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. '
Is anyone able to recreate and/or solve this issue?
The text was updated successfully, but these errors were encountered: