I'm receiving these warnings when I run npm i -g #vue/cli - how can I investigate and fix the problem?
npm WARN deprecated #hapi/joi#15.1.1: joi is leaving the #hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/address#2.1.4: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm ERR! Unexpected end of JSON input while parsing near '...omposition":"6.0.1-al'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Micheal\AppData\Roaming\npm-cache\_lo
The error you have received here is:
Unexpected end of JSON input while parsing near '...omposition":"6.0.1-al'
This error means that a file contains invalid JSON, but it doesn't tell you which file it is.
However, because this is npm, the most likely candidate is package.json - search in that file for "6.01-al" and see if you can find the error. This is almost always caused by manually editing the dependencies in your package.json file.
In this case, it looks like the error is that a file has been truncated, in which case it could be one of the packages you are installing, that has failed to download properly or might have been corrupted en-route. Try installing the package on another machine if you can.
Related
ng serve
An unhandled exception occurred: Cannot find module '#angular-devkit/build-angular/package.json'
See "/tmp/ng-lQbnUK/angular-errors.log" for further details.
and when i create the project i got those errors
installing packages (npm)...npm WARN deprecated tslint#6.1.3: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
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 request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
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 har-validator#5.1.5: this library is no longer supported
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 '...p2zraxyqI5tT/g9UTBUgK'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/safa/.npm/_logs/2021-02-15T15_46_03_482Z-debug.log
✖ Package install failed, see above.
The Schematic workflow failed. See above.
Delete node modules folder & package-lock.json file.
Run again
npm install
ng serve
if that doesn't work, upgrade the dependencies with
npm update
Delete node-modules folder
Then npm i
if error presist again then
npm i #angular-devkit/build-angular
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
Bear with me. This is my first time posting a question.
What I did: cloned repo went into main folder and used npm install.
npm WARN deprecated #angular/http#5.2.11: Package no longer supported. Use #angular/common
instead, see https://angular.io/guide/deprecations#angularhttp
npm WARN deprecated angularfire2#5.4.2: AngularFire has moved, we're now #angular/fire
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 WARN deprecated angular-sortablejs#2.7.0: angular-sortablejs was renamed to ngx-sortablejs, please use the latter one, only ngx-sortablejs will be updated in the future
npm WARN deprecated extract-text-webpack-plugin#3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
npm WARN deprecated bfj-node4#5.3.1: Switch to the `bfj` package for fixes and new features!
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated #google-cloud/functions-emulator#1.0.0-beta.6: Deprecating in favor of
the Functions Framework and firebase-tools. See https://github.com/googlearchive/cloud-functions-emulator/issues/327
npm WARN deprecated browserslist#2.11.3: Browserslist 2 could fail on reading Browserslist
>3.0 config used in other tools.
npm WARN deprecated request#2.81.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated hawk#3.1.3: This module moved to #hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated json3#3.3.2: Please use the native JSON object instead of JSON 3
npm WARN deprecated boom#2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated cryptiles#2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated sntp#1.0.9: This module moved to #hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated hoek#2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
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
node-pre-gyp ERR! cwd C:\Users\genod\programing\tonysProjects\TAHelper\node_modules\grpc
node-pre-gyp ERR! node -v v12.16.1
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc#1.20.0 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc#1.20.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
When I use sudo npm install command get error.
usr6783#usr6783:~/albarakaMobil/client/mobile-branch$ sudo npm install
[sudo] password for usr6783:
npm WARN deprecated react-native-languages#1.0.7: This project has been renamed to react-native-localize. Install using react-native-localize instead.
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
npm WARN deprecated sw-precache#5.2.1: Please migrate to Workbox: https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
npm WARN deprecated browserslist#2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated circular-json#0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated sw-toolbox#3.6.0: Please migrate to Workbox: https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
npm WARN deprecated core-js#1.2.7: core-js#<2.6.5 is no longer maintained. Please, upgrade to core-js#3 or at least to actual version of core-js#2.
npm WARN deprecated browserslist#1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated node-uuid#1.3.3: Use uuid module instead
npm WARN deprecated flatten#1.0.2: I wrote this module a very long time ago; you should use something else.
npm WARN deprecated socks#1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm ERR! code 1
npm ERR! Command failed: git clone --mirror -q git://github.com/rhdeck/react-native-fix-xcode-10.git /home/usr6783/.npm/_cacache/tmp/git-clone-aa7d6ae5/.git
npm ERR! /home/usr6783/.npm/_cacache/tmp/git-clone-aa7d6ae5/.git: Permission denied
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! /home/usr6783/.npm/_logs/2019-05-07T06_12_46_865Z-debug.log
use :
sudo npm cache clean -f
referred to this
I encountered a similar problem today, and npm suggested I should run
sudo chown -R 501:20 "~/.npm"
It says this is due to a bug in previous versions of npm and has since been addressed. You might want to update to npm version 7.10.0 or later, and run the command above.
I am using nvm for managing node versions. I have installed it as a plugin to zsh via zsh-nvm. I have installed two versions of node - v6.1.0 and v.0.10.42. Since I am working on a project, which uses the latter one, I have set it at the default one. Now, every time I open a terminal window, I get these warnings:
npm WARN deprecated This version of npm lacks support for important features,
npm WARN deprecated such as scoped packages, offered by the primary npm
npm WARN deprecated registry. Consider upgrading to at least npm#2, if not the
npm WARN deprecated latest stable version. To upgrade to npm#2, run:
npm WARN deprecated
npm WARN deprecated npm -g install npm#latest-2
npm WARN deprecated
npm WARN deprecated To upgrade to the latest stable version, run:
npm WARN deprecated
npm WARN deprecated npm -g install npm#latest
npm WARN deprecated
npm WARN deprecated (Depending on how Node.js was installed on your system, you
npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if
npm WARN deprecated on Windows, run them from an Administrator prompt.)
npm WARN deprecated
npm WARN deprecated If you're running the version of npm bundled with
npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS
npm WARN deprecated will be bundled with a version of npm#2, which has some small
npm WARN deprecated backwards-incompatible changes made to `npm run-script` and
npm WARN deprecated semver behavior.
I tried adding a ~/.npmrc file, in which I put loglevel="error", but I still get these warnings. I guess I need to put some setting in my .zshrc file. Could you point me to which one?
As far as I'm aware, the only way to suppress these warnings (from npm) is to use a version of npm that doesn't emit them.
NODE_NO_WARNINGS=1 npm install ...