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 [-g] [<packagename>...] is a command on CLI, which updates a specified package(s), or all packages listed when no package name is specified, to the latest version defined by its tag config in the npmjs repository.

The rules of (aka: ) are respected when determining the appropriate latest version of itself to update to.

References:

88 questions
1
vote
0 answers

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 injection in ejs …
meez
  • 3,783
  • 5
  • 37
  • 91
1
vote
0 answers

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 npm update my-dependency it changes the version in package-lock.json file to…
a.khakh
  • 115
  • 10
1
vote
0 answers

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 think it is paranormal. So is there a way to fix…
1
vote
1 answer

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 urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated har-validator@5.1.5: this library…
marcamillion
  • 32,933
  • 55
  • 189
  • 380
1
vote
0 answers

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/npx.1' -> '/usr/local/share/man/man1/npx.1' Remove the…
dewhen
  • 11
  • 5
1
vote
1 answer

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.json stays the same, even whit --save or --save-dev This is the expected…
rodriciru
  • 141
  • 2
  • 9
1
vote
1 answer

Nuxt Fatal Error - subpath './package.json' not define in export

nuxt version: 2.14.12 After updating packages through npm update and then using npm run dev, the compiler give the fatal error. Console output Starting Laravel development server: http://127.0.0.1:3001 [Wed Dec 16 14:00:42 2020] Failed to listen on…
J03Bukowski
  • 102
  • 3
  • 19
1
vote
1 answer

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": "^12.0.0", "B": "^12.0.0", "C": "^12.0.0", …
Shnd
  • 1,846
  • 19
  • 35
1
vote
0 answers

Unable to upgrade to latest version of npm after installing recent Node version

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). Please suggest me a…
ranmsd
  • 11
  • 2
1
vote
1 answer

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 chance it might, what is the best method for testing…
MarkHughes88
  • 591
  • 3
  • 11
  • 25
1
vote
0 answers

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 -gn $USER) C:\Users\Rahul Raj\.config Please …
Rahul Raj
  • 11
  • 1
1
vote
1 answer

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 running ngx-bootstrap tests I do not see the answers I…
Jennifer Espinoza
  • 1,433
  • 2
  • 6
  • 6
1
vote
1 answer

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 have to manually update the version of the…
Cédric Bloem
  • 1,447
  • 3
  • 16
  • 34
1
vote
0 answers

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 syntax error in the PowerShell window. I've…
TastyGuava
  • 41
  • 1
  • 1
  • 4
1
vote
2 answers

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 EBADPLATFORM npm ERR! notsup Unsupported platform for…
Niju
  • 487
  • 1
  • 9
  • 18