I am new to Angular and I am facing the following problem in creating a new project. I have already installed nodejs and npm which are the prerequisites of Angular. I also installed the angular CLI but when I am trying to create a new project the following error is coming.
[⠼ Installing packages...npm WARN deprecated request#2.88.2: request has been deprecated, see
npm WARN deprecated urix#0.1.0: Please see
npm WARN deprecated resolve-url#0.2.1
npm ERR! Unexpected end of JSON input while parsing near '...p":"^0.8.0","grunt-co'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/saumya/.npm/_logs/2020-04-12T15_22_00_125Z-debug.log
✖ Package install failed, see above.
The Schematic workflow failed. See above.
You need to clear npm cache. If u are using windows location is C:\Users\\AppData\Roaming\npm-cache. Simply delete cache folder and try again
If this also not work, it's better to install the latest npm and angular by removing the old version and npm-cache as well. Then you will have the latest compatible versions
remove this folder: C:\Users\AppData\Roaming\npm-cache.
OR
Run this command:
npm cache clear --force
Related
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
I was facing this problem in windows 7 and now on Ubuntu 19.10. I just finished formatting my PC and setup the development environment. Anyone can help?
node v12.16.2
npm v6.14.4
npm install -g gatsby-cli
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm ERR! Unexpected end of JSON input while parsing near '...tore-4.0.0.tgz","file'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/rodrigo/.npm/_logs/2020-04-14T03_11_30_986Z-debug.log
When a retry to run npm install -g gatsby-cli
, this is what happens:
npm ERR! Response timeout while trying to fetch https://registry.npmjs.org/emoji-regex (over 30000ms)
I have to change the registry of npm.
npm config set registry "https://registry.npmjs.com/"
Then clear the cache.
npm cache clean --force
And finally run the gatsby installer.
npm install -g gatsby-cli
Two issues here. The first, relating to the So this happens when you have an interruption in connection and you were in the middle of parsing some of those JSON files during an install. They are supposed to auto repair but sometimes you will need to:
npm cache clean --force
to clear down the cache manually.
The second is due to the fact you have not set a registry to pull the packages from.
npm config set registry "https://registry.npmjs.com/"
Then you will need to reinstall with
npm install -g gatsby-cli
Getting error while installing parcel-bundler using npm, my command is follows:
npm install -g parcel-bundler
Below is error description.
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm ERR! Unexpected end of JSON input while parsing near '...Fzsf0KuydGYbbeMJ+WVIy'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\warrior\AppData\Roaming\npm-cache_logs\2020-04-12T05_01_07_407Z-debug.log
Try first cleaning the cache:
npm clean-install
I'm currently learning angular 9 so when i tried to install node js and npm with latest version that is node version 12.* and npm version 6.14.*. I'm facing problem whith ng new and npm install command
Issues are as follows:
sudo npm install
npm WARN deprecated mkdirp#0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! Unexpected end of JSON input while parsing near '...ure":"-----BEGIN PGP '
npm ERR! A complete log of this run can be found in:
npm ERR! /home/frustrated_coder/.npm/_logs/2020-03-29T14_31_40_275Z-debug.log
ng new angular-test
Installing packages...npm WARN deprecated mkdirp#0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! Unexpected end of JSON input while parsing near '...200772","tarball":"ht'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/frustrated_coder/.npm/_logs/2020-03-29T14_20_56_952Z-debug.log
✖ Package install failed, see above.
The Schematic workflow failed. See above.
Also i working on angular-electron but the majority of the problem is with that as well due to npm install command in it.
This is the https://github.com/maximegris/angular-electron url from where i'm cloning angular electron.
Use Windows Powershell as an administrator and run;
npm cache clean --force
npm install -g #angular/cli
I am trying to install Bootstrap using the npm install method. I have been on this for a while now and am wondering if I am doing something wrong? the npm install is still included on Bootstrap site as well as github and the npm page.
From what I understand using bower has been deprecated. Had serious issues using gulp. Any assistance or a link to an updated tutorial would be greatly appreciated.
Following errors occured while trying to install via terminal:
~/GitHub/GitSite $ npm install boostrap
npm WARN deprecated boostrap#2.0.0: Package no longer supported.
Contact support#npmjs.com for more info.
npm WARN gitsite#1.0.0 No repository field.
+ boostrap#2.0.0
updated 1 package in 1.902s
~/GitHub/GitSite $ npm install boostrap jquery popper.js --save
npm WARN deprecated boostrap#2.0.0: Package no longer supported.
Contact support#npmjs.com for more info.
npm WARN gitsite#1.0.0 No repository field.
+ boostrap#2.0.0
+ jquery#3.3.1
+ popper.js#1.14.3
updated 3 packages in 2.216s
In the download was included all the correct folders, however, in node_modules > boostrap there was a README file that said:
Deprecated Package
This package is no longer supported and has been deprecated. To avoid
malicious use, npm is hanging on to the package name.
Please contact support#npmjs.com if you have questions about this
package.
~/GitHub/GitSite $ npm install boostrap
You made a typo buddy, npm install boostrap instead of npm install bootstrap
Try with the correct package name and it will work!
Try this:
npm install --save bootstrap#4.1.0
Do you have bootstrap#2.0.0 listed in your package.json dependencies?
try npm i bootstrap#4.1.0