Unable to install jest using npm i jest - jestjs

npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
This is the warning, I am getting. Can you help ?

Try installing
npm install --save-dev jest

Related

NestJS installation npm WARN deprecated

When I try to install NestJS via
npm i -g #nestjs/cli, I get:
npm WARN deprecated sourcemap-codec#1.4.8: Please use #jridgewell/sourcemap-codec instead
Is this expected behavior to install Nest? Or is something wrong here?

Error when running "npm install -g #vue/cli", reinstall attempted many times

I have been stuck on this for a long time. When i run npm install -g #vue/cli, it pops up the following error. simliar error occurs also when I run vue create project-name. I have tried reinstall many times and I have tried clean the cache as well. I am clear that the dictionary in the error " C:\Users\zhang\node_modules.bin/../node/bin/node" does not exist, but i have no idea how to fix it.
C:\Users\zhang>npm install -g #vue/cli
npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/joi#15.1.1: Switch to 'npm install joi'
npm ERR! code 127
npm ERR! path C:\Users\zhang\AppData\Roaming\npm\node_modules\#vue\cli\node_modules\core-js-pure
npm ERR! command failed
npm ERR! command D:\Program Files\git\bin\bash.exe -c node -e "try{require('./postinstall')}catch(e){}"
npm ERR! /c/Users/zhang/node_modules/.bin/node: line 8: C:\Users\zhang\node_modules\.bin/../node/bin/node: No such file or directory
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\zhang\AppData\Local\npm-cache\_logs\2021-05-02T21_16_30_121Z-debug.log
I have been stuck on this for hours and I appreciate any help from you
Thank you !
The WARNs is not an issue.
It did fail to run node binaries.
npm ERR! /c/Users/zhang/node_modules/.bin/node: line 8: C:\Users\zhang\node_modules\.bin/../node/bin/node: No such file or directory
Make sure you get the right path. Or change the env PATH variable accordingly.
please follow any of these to avoid these
1.sett the Environment path correctly
2.make sure that current user has the permission to process the data
ls -la /usr/lib/node_modules
whoami
sudo chown -R $USER /usr/lib/node_modules(setting the permission to current user)
3.Install the npm as sudo user by
sudo npm i -g #vue/cli

How do I get rid of this angular error message

While trying to create a new project with angular, I used the command ng new my-dream-app in command prompt and I receiver the following error message:
Installing packages...npm WARN deprecated tslint#6.1.1: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated fsevents#1.2.12: fsevents 1 will break on node v14+. Upgrade to fsevents 2 with massive improvements.
npm ERR! Unexpected end of JSON input while parsing near '...t-config-prettier":"^'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Izormen Onotieose\AppData\Roaming\npm-cache\_logs\2020-04-21T14_21_50_827Z-debug.log
× Package install failed, see above.
Pls how do I go about this?
It looks like it is a cache error. Try this:
npm cache clean --force
npm install -g #angular/cli
Cheers!
Try cleaning the cache and reinstalling global Angular CLI.
Open CMD as administrator and run
npm cache clean --force
npm install -g #angular/cli

Angular ng new throwing error: npm ERR! Unexpected end of JSON input while parsing near

Im trying to create a new angular project, after writing 'ng new project', it starts downloading but then gives me this error:
Installing packages...npm WARN deprecated tslint#6.1.2: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to
fsevents 2.
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! Unexpected end of JSON input while parsing near '...EmGWKHtdKo\nmvJ5sCP6T'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\USER\AppData\Roaming\npm-cache\_logs\2020-05-13T09_41_32_733Z-debug.log
× Package install failed, see above.
does anyone know whats wrong? tnx
This happened due to you cache got corrupted. You need to clean your cache and re-install #angular/cli.
Open command prompt and run below commands.
npm cache clean --force
npm install -g #angular/cli

npm WARN deprecated tslint#6.1.2: TSLint has been deprecated in favor of ESLint

when i run ng new it shows
\ Installing packages...npm WARN deprecated tslint#6.1.2: TSLint has
been deprecated in favor of ESLint. Please see
https://github.com/palantir/tslint/issues/4534 for more information.
npm WARN deprecated request#2.88.2: request has been deprecated, see
https://github.com/request/request/issues/3142
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node
v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node
v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated urix#0.1.0: Please see
https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url#0.2.1:
https://github.com/lydell/resolve-url#deprecated
npm ERR! Unexpected end of JSON input while parsing near
'...-grunt-tasks":"^4.0.0'
npm ERR! A complete log of this run can be found in:
npm ERR!
C:\Users\Abitech\AppData\Roaming\npm-cache_logs\2020-06-02T16_28_06_793Z-debug.log
× Package install failed, see above.
The Schematic workflow failed. See above.
npm cache clean --force
npm uninstall -g #angular/cli
npm install -g #angular/cli
ng new projectName
This worked for me
i had the exact same error so i followed these steps and then i was able to create a new project successfully
1) Run ( Win + R ) then type %AppData% , then clear the npm-cache folder , i.e delete that folder manually.
2) Then again run the command ng new project name
This worked for me :)
Just run:
npm cache clean --force
npm install -g #angular/cli#latest
npm cache verify
npm install npm#latest -g
Then:
ng new projectName
(...) TSLint has been deprecated in favor of ESLint.
If npm update tslint didn't help, you can install and use eslint instead.
Url: https://www.npmjs.com/package/eslint
1.Run npm cache clean --force
2.Manually delete npm and npm-cache folders from AppData/Roaming folder (Win + R, Type %AppData% and enter)
3.Run Node Installer and repair
4.Reinstall npm install -g #angular/cli
5.Rerun ng new newApp
Worked :)
Just delete npm-cache folder in 'C:\Users\User Name \AppData\Roaming'
and recreate project

Resources