Skip to main content

Questions tagged [npm-update]

"npm update" is command on npm CLI, which updates a specified package(s), or all packages listed, to the latest version available in the npmjs repository, whilst respecting semver.

npm-update
Filter by
Sorted by
Tagged with
2171 votes
67 answers
2.4m views

How can I update Node.js and npm to their latest versions?

I just installed Node.js and npm. I installed npm for access to additional Node.js modules. After I installed Node.js and npm, I noticed that neither were the latest versions available. So my ...
Dail's user avatar
  • 21.9k
35 votes
2 answers
13k views

What is the difference between ng update and npm update?

Would someone please explain the difference between ng update in Angular 6 and npm update?
saravana va's user avatar
  • 1,129
32 votes
3 answers
55k views

How to update package.json to latest version of each package?

Before you flag it as duplicate, I have searched for the similar questions and none of them helped me. Currently this is what I have tried: Delete package-lock.json file. Delete node_modules. Run npm ...
Samson's user avatar
  • 1,708
31 votes
1 answer
54k views

How to fix Npm missing peer dependency

I do not know how to fix below peer dependency error. mondwan@mondwan-All-Series:~/Documents/git/py-cli_build_tools$ sudo npm -g list | grep eslint ├─┬ [email protected] ├─┬ [email protected] ├─┬ ...
Mond Wan's user avatar
  • 1,892
20 votes
1 answer
7k views

NPM Update - Forcing Package Upgrades (Ignoring SemVer)

Is there a reasonable way to force an update on a node package? It's great that we are protected from aggressive package development, but it seems like most package versions get saved as exact (i.e. ...
R. Glenn's user avatar
  • 483
18 votes
7 answers
37k views

Fix a npm install failure with error code EINTEGRITY

I have browsed through various similar posts here to no avail. They all arrive at similar solutions about using npm cache verify or npm cache clear, etc. I have even went as far as to completely ...
GingerSwag's user avatar
13 votes
3 answers
14k views

Command "npm update" vs package "npm-check-updates"

What is the difference between the command npm update and the package npm-check-updates? Is it fully safe to use the latter? It seems after executing npm update not all packages are updated, thus it ...
João Pimentel Ferreira's user avatar
10 votes
1 answer
23k views

Difference between `npm update` and `remove package-lock.json` plus `npm install`?

What is essential difference between these commands, except that npm update modify package.json? rm package-lock.json npm install npm update --dev
yakunins's user avatar
  • 721
8 votes
1 answer
10k views

es5BrowserSupport by Angular

I have updated my Angular CLI, with version 10.0.5 (globally and locally both) And while I am trying to build my angular project by below command- ng build I am getting below error- Schema ...
sunil's user avatar
  • 145
8 votes
4 answers
10k views

Unable to update Angular from 10 to 11 due to dependency errors

I am following this site and trying to update my project to 11.0 through the following command. npx @angular/cli@11 update @angular/core@11 @angular/cli@11 Every time I run it, it gives me the ...
mfs's user avatar
  • 4,034
7 votes
1 answer
12k views

How do I npm update dependency versions in the package-lock.json?

As in the title, but: If it is possible, I don't want to hand-rewrite the version string manually in the package-lock.json, I tried the following: How do I update each dependency in package.json to ...
Dragonturtle's user avatar
7 votes
1 answer
3k views

Angular new project creation through ng new command is creating package.json with old versions

I am trying to create a new Angular project through ng new command ng new <angularProjectName> On navigating inside the newly created project and checking the package.json file, and it has ...
Sri's user avatar
  • 83
5 votes
0 answers
892 views

How do I really, truly, update all dependencies with NPM?

How do I (recursively) update all dependencies with NPM? My usual approach (using npm-check-updates) is this: ncu -u # updates my package.json to contain the newest versions of my ...
fefrei's user avatar
  • 895
5 votes
0 answers
235 views

What to do when nsp find a vulnerability in a dependency of a dependency

I ran nsp on a project I'm about to deploy and i got this vulnerability Name │ mime CVSS │ 7.5 (High) Installed │ 1.2.11 Vulnerable │ < 1.4.1 || > 2.0.0 < 2.0.3 ...
Chiko's user avatar
  • 606
4 votes
2 answers
3k views

npm-check-updates (npm ncu): avoid breaking updates

The command npm-check-update displays mayor updates in red. This can be already seen in the first image of the documentaton. But is there a way to exclude these breaking changes from the automatic ...
BaluJr.'s user avatar
  • 1,050
4 votes
3 answers
4k views

Angular 10.2 build: Localized bundle generation failed: Cannot read property 'value' of undefined

I have a project build on Angular 10.0.11. I updated the project to 10.2 with npm update, but this resulted in multiple Unable to fully load [...] for source-map flattening: Circular source file ...
Jette's user avatar
  • 2,527
3 votes
1 answer
5k views

Reverting to Previous Version of Package.json When a Dependency Bug Arises

While in the process of updating an Angular app I and colleagues are working on, I ended up running "npm update" when I meant to run "npm install". Doing so led me on a bit of a rabbit trail because ...
Rey's user avatar
  • 1,413
3 votes
1 answer
857 views

git new branch without npm update Angular 10

I created a new Angular 10 app on a git feature branch. I set up the basic framework for it, then merged that feature branch into release. I created a new feature branch from release to start ...
ScubaSteve's user avatar
  • 8,124
3 votes
1 answer
1k views

Error: Local workspace file ('angular.json') could not be found when upgraded to Angular 6

I have upgrading my project from Angular 5 to Angular 6. When I try to run the application using npm start it is throwing a below error. I know that there is already questions like this that has ...
Bhushan Khaladkar's user avatar
3 votes
0 answers
350 views

Upgrade all npm packages in React Native

I want to upgrade all npm packages to latest stable versions of my react native application. Is there any standard procedure to do that ? Good to mention that I have both android and ios users, so I ...
Tafsir Ahamed's user avatar
3 votes
0 answers
165 views

When I update vuejs3 to v3.2.40 why am I getting the error "An index signature parameter type must be either string or number"?

I am trying to simply upgrade the version of vue3 we are running at work from v3.2.31 to v3.2.40. However, when I do, I am now getting an error in the runtime-dom.d.ts Below is a screen shot from the ...
JC_Meister's user avatar
3 votes
2 answers
318 views

What NPM CLI command can be used to update a dependency of a dependency?

CURRENTLY I have immer as a dependency in 2 locations. +-- [email protected] | `-- @aws-amplify/[email protected] | `-- [email protected] `-- [email protected] `-- [email protected] `-- immer@8....
Wronski's user avatar
  • 1,566
2 votes
1 answer
2k views

npm - Semver versioning - Updating a package with a caret "^"

I have a npm package in my package.json file "clean-webpack-plugin": "^0.1.18" Now when I hover over the package I can see that there is a newer version "clean-webpack-plugin": "^0.1.19" Now, as ...
Legends's user avatar
  • 22.1k
2 votes
1 answer
2k views

NPM crashes when I try to update a package with --depth 21

I'm trying to fix the npm vulnerabilities in my project. On trying npm audit I got a command to fix the vulnerability in one of the packages. $ npm update kind-of --depth 21 On running this command, ...
Akshai T R's user avatar
2 votes
1 answer
266 views

how to update packages inside node_modules

how to update packages which are in my node_modules but not in dependencies? I try npm install --sace --legacy-peer-deps <package-name> but it add package to my dependencies.
j.dev's user avatar
  • 21
2 votes
0 answers
429 views

How to fix date-fns errors after package upgrade in Angular app?

After upgrading packages in Angular app using yarn upgrade, I now get multiple errors like shown in the image below. The version of date-fns has not changed (2.16.1), so the problem is something else. ...
Ketija Krista's user avatar
2 votes
0 answers
1k views

Issue when updating npm

When handling an Node.js project, I run the npm install command. Things happen and I get this message at the end: ╭────────────────────────────────────────────────────────────────╮ │ ...
Michel's user avatar
  • 11.4k
2 votes
0 answers
54 views

Why npm-update does not install all the packages to the their respective latest version?

I've searched other questions but I need a clear canonical answer, since it's not yet clear for me why the command npm update does not install each package to the latest version, and thus we need an ...
João Pimentel Ferreira's user avatar
2 votes
0 answers
318 views

npm-windows-upgrade does not complete

I've installed Nodejs and went to upgrade npm, but the process just hangs. Here's what I did: I opened a Powershell prompt as administrator. I ran the following commands: Set-ExecutionPolicy ...
onefootswill's user avatar
  • 3,928
1 vote
1 answer
1k views

Npm update wont modify package.json

Lets imagine i have a npm dependency as this: "webpack": "^5.24.4" Lets imagine that a new 5.30.0 version is released, so i do a npm update. Webpack is updated, but the package....
rodriciru's user avatar
  • 151
1 vote
1 answer
727 views

Update intermediary npm dependencies with package-lock.json

What is the proper way to update an intermediary dependency with npm in the presence of the package-lock.json file? For example: $ npm outdated --depth=1 eslint Package Current Wanted Latest ...
rink.attendant.6's user avatar
1 vote
2 answers
7k views

Upgrade to latest node version in windows through npm

I am trying to upgrade nodejs to latest version in my machine. I am getting below error after executing below commands through npm. npm install -g n This gave error as below npm ERR! code ...
Niju's user avatar
  • 487
1 vote
1 answer
981 views

"Error: error:0308010C:digital envelope routines::unsupported" Node version error

Starting the development server... Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:69:19) at Object.createHash (node:crypto:133:10) at ...
Rohit Bale's user avatar
1 vote
1 answer
2k views

How to do `npm update` without modifying package.json?

I have couple of dependencies that they always need to be on the latest specific major version. So I added them to the package.json dependencies list like below: { ... dependencies: { "A&...
Shnd's user avatar
  • 2,000
1 vote
1 answer
8k views

Error: EACCES: permission denied, unlink '/usr/local/bin/npm

First and foremost I have looked into these previous post for answers: EACCES: permission denied, unlink Error: EACCES: permission denied, unlink '/usr/local/bin/npx' Error while building or ...
Jennifer Espinoza's user avatar
1 vote
0 answers
469 views

npm update adds "dev:true" in package-lock.json

I'm auditing the packages in my project. I want to address vulnerability for each package separately rather than running npm audit fix. Most of the vulnerabilities are in the dependencies and not in ...
Ashish Chinchkhede's user avatar
1 vote
0 answers
1k views

Firebase Functions: UUID version is different for firebase-tools

When I deploy functions to Cloud Functions I get this warning: npm WARN deprecated [email protected]: this library is no longer supported npm WARN deprecated [email protected]: Debug versions >=3.2.0 &...
savante's user avatar
  • 806
1 vote
0 answers
1k views

Running 'npm update ejs --depth 2', to fix security vulnerabilities does nothing

In the pipeline I get a message: Check package security issues It tells me # Run npm update ejs --depth 2 to resolve 1 vulnerability. This is the description tabel: High │ Template ...
meez's user avatar
  • 4,492
1 vote
0 answers
403 views

How to prevent `package.json` beign rewritten by `npm update`

Let's say I have a dependency in my package.json: "dependencies": { "my-dependency": "~1.0.0" } And there's 1.0.1 version of the package available. When I run ...
a.khakh's user avatar
  • 145
1 vote
0 answers
646 views

Npm freezes for some time

I have a problem. When I run any npm commands in cmd (like npm install or npm update) , my terminal sometimes freezes for 3-5 minutes like in below example. It doesn't output anything at that time. I ...
Dmytro Yakymenko's user avatar
1 vote
1 answer
995 views

NPM update fails with make error 1 and exit code 2

I am running npm update for npm version 7.11.2 on Mac OS Catalina and I get the following error: $ npm update npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated npm ...
marcamillion's user avatar
  • 33.6k
1 vote
0 answers
158 views

NPM update failed. Error says to remove file?

Im having a hard time trying to update npm it crashes when i run npm i -g npm and it says i have to remove an existing file "file already exists, symlink '../../../lib/node_modules/npm/man/man1/...
dewhen's user avatar
  • 11
1 vote
0 answers
182 views

Unable to upgrade to latest version of npm after installing recent Node version [duplicate]

The current version of npm installed in my pc is 4.6.1. I want to upgrade to the latest version or any other version >= 5.2.0. But when try to do so, I am getting these errors (as displayed below). ...
ranmsd's user avatar
  • 11
1 vote
1 answer
186 views

Upgrading NPM from 5.8 to latest

I want to look at upgrading NPM on a project I'm working on from 5.8.0 to the latest version. Is this something that is safe to do without breaking any packages i have installed? And if there's a ...
MarkHughes88's user avatar
1 vote
0 answers
408 views

issue in npm update check failed

npm update check failed Try running with sudo or get access to the local update config store via sudo chown -R $USER:$(id -...
Rahul Raj's user avatar
1 vote
1 answer
635 views

Why does NPM install an empty "etc" folder and multiple command files?

For some reason, whenever I update or install a package in my project, NPM installs an empty etc folder and multiple .cmd files (see pic down below). It also doesn't update my package.json anymore, I ...
Cédric Bloem's user avatar
1 vote
0 answers
358 views

How to fix "SyntaxError: invalid syntax" for npm-update?

I'm currently having issues with some of my modules being outdated/missing for my Discord.js bot, so I want to use npm-update to fix my outdated/missing packages. When I go to use the command; I get a ...
TastyGuava's user avatar
1 vote
4 answers
5k views

Updated Vue to 3.2.3. vue --version shows as 3.0.1 still... How to fix?

I am attempting to update my Vue version to the most recent, however after running "npm install -g @vue/cli" (as told to by the vue website), it said everything ran fine and shows 3.2.3 had installed, ...
KJParker's user avatar
  • 760
1 vote
1 answer
136 views

Can npm-update and npm-install give different result?

Let's say we have 3 packages with the following dependencies: C -> B@^1.0.0 and B -> A@^1.0.0 (module C depends only on module B version 1.0.0 and above; module B depends on module A version 1.0.0 ...
Shula's user avatar
  • 306
1 vote
0 answers
852 views

How to update angular-material2 using npm properly

I am using angular material2 in my angular project. This is the entry in package.json under dependencies "@angular/material": "^2.0.0-beta.1", I tried the following command npm update @angular/...
Sunil Garg's user avatar
  • 15.4k