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
Related
I'm facing an issue when I try to install the npm on my node project. I tried to clean the npm cache and downgraded the node also but error is not fixed.
node - v14.17.6
npm - 6.14.8
npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated circular-json#0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! Unexpected token ! in JSON at position 0 while parsing near '!function(){var a="/...'
npm ERR! A complete log of this run can be found in:
I solved the problem by running this command:
npm config set registry https://registry.npmjs.org/
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
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
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 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