Cannot manage to install jest

Cannot manage to install jest



I am using npm to install jest in order to perform some tests over my js code.
In order to install it I use the command:


npm


jest


$ npm install --save-dev jest



As described on their website.



However, it fails over and over again with these errors:
enter image description here



What should I do in order to install jest properly?


jest



This is my package.json :



"name": "my-app",
"version": "0.1.0",
"private": true,
"devDependencies":
"babel-preset-env": "^1.7.0",
"jest": "^23.5.0",
"react-scripts": "0.6.1"
,
"dependencies":
"adal-angular": "^1.0.13",
"axios": "^0.15.3",
"bootstrap": "^3.3.7",
"jquery": "^3.1.1",
"lodash": "^4.16.4",
"react": "^15.4.2",
"react-bootstrap": "^0.30.5",
"react-bootstrap-typeahead": "^1.2.0",
"react-dom": "^15.4.2",
"react-http-request": "^1.0.2"
,
"scripts":
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
,
"description": "This project was bootstrapped with [Create React App]
(https://github.com/facebookincubator/create-react-app).",
"main": "index.js",
"author": "",
"license": "ISC"



Current message:
enter image description here





doesn't look like anything to do with jest or react, I'd try rn -rf node_modules (or Win equivalent) and maybe clear npm cache npm cache clean --force and try again.
– lecstor
Aug 29 at 13:34


rn -rf node_modules


npm cache clean --force




1 Answer
1



Please install react v16 for this:


npm install --save react@^16.4.2 react-dom@^16.4.2



then run this command:


npm update --save



to get all dependent packages





I did but still get the same message..
– I.zvi
Aug 30 at 9:16





please share your package.json
– Sakhi Mansoor
Aug 30 at 9:17


package.json





Ok, edited my question it's now there.
– I.zvi
Aug 30 at 9:42





it says react is v15
– Sakhi Mansoor
Aug 30 at 9:43





I surely installed v16.. Should I change it manually or is there any other way to update it ?
– I.zvi
Aug 30 at 9:46






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)