Reputation: 432
I'm trying to install jest using the following command
npm i jest --save-dev
I'm getting the following error
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "i" "jest" "--save-dev"
npm ERR! node v8.11.3
npm ERR! npm v5.6.0
npm ERR! Class constructor cannot be invoked without 'new'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\Windows\system32\npm-debug.log
Any idea what could be the problem?
Upvotes: 2
Views: 804
Reputation: 69
Change the presets in your .bablerc with
"presets": ["es2015", "stage-2", "react"]
Also, try to delete package-lock.json and node_modules, then npm i and try again
Upvotes: 3