question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to check for outdated dependencies in packages.

See original GitHub issue

I am trying to convert our existing projects into a Lerna project. so I have created all packages for different repositories and setup all tools and config for my project. everything is working fine.

I want to know how to list all dependencies in my packages that are outdated. I wish to keep my project up to date with all new updates.

Expected Behavior

I want to run npm outdated or any lerna command which lists all dependencies that have changed/updated.

Current Behavior

when i run npm outdated or lerna exec npm outdated in my local package it obviously fails because i am using local packages which is not there in npm repo … (react-elements-md is my local package)

npm ERR! code E404
npm ERR! 404 Not found : react-elements-md
npm ERR! 404 
npm ERR! 404  'react-elements-md' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/akashtalreja/.npm/_logs/2018-07-16T14_43_51_022Z-debug.log
lerna ERR! exec Errored while executing 'npm outdated' in 'react-redux-sagas'
lerna ERR! execute callback with error
lerna ERR! Error: Command failed: npm outdated
lerna ERR!     at Promise.all.then.arr (/usr/local/lib/node_modules/lerna/node_modules/execa/index.js:236:11)
lerna ERR!     at <anonymous>
{ Error: Command failed: npm outdated
    at Promise.all.then.arr (/usr/local/lib/node_modules/lerna/node_modules/execa/index.js:236:11)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:160:7)
  code: 1,
  killed: false,
  stdout: null,
  stderr: null,
  failed: true,
  signal: null,
  cmd: 'npm outdated',
  timedOut: false,
  exitCode: 1 }

Possible Solution

possible solution i can think of some command like lerna outdated which would list down the dependencies in a package that can updated.

Steps to Reproduce (for bugs)

hit npm outdated in any package that used your local packages

am i missing something ? it looks quite simple there must be a way to update npm dependencies. and keep your project updated. i also read in some issue @evocateur mentioning "If you're never publishing packages to a registry (public or private), I don't recommend using lerna. There is no shame in relative path imports." . . since i am not going to publish anyway, should i really use lerna in my project ?

Executable Version
lerna --version 2.11.0
npm --version 6.2.0
yarn --version 1.6.0
node --version 9.6.1

| OS | Version | | macOS High Sierra | 10.13.3-= |

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
amokcommented, Nov 22, 2018

I use lerna exec yarn outdated or just yarn outdated. also there are some aspects with using yarn workspaces - https://github.com/yarnpkg/yarn/issues/3859#issuecomment-441000287

4reactions
tivaccommented, Jul 16, 2018

I’m using lerna@3

npm outdated && npx lerna exec --no-bail -- npm outdated

Seems to do what you’d expect.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm-outdated
This command will check the registry to see if any (or, specific) installed packages are currently outdated. By default, only the direct dependencies...
Read more >
Run npm outdated to check old packages - DEV Community ‍ ‍
Here is the tip: run npm outdated from the terminal in your project folder to see if the installed packages are outdated. npm...
Read more >
npm check and update package if needed - Stack Overflow
npm outdated will identify packages that should be updated, and npm update <package name> can be ... Check for outdated, incorrect, and unused...
Read more >
NPM Quick Tips — #3 Show Installed and Outdated Packages
json and look up the dependencies section? You know, that is for sure a valid thought and of course you'll find what you're...
Read more >
How to find outdated packages in npm? - MoreOnFew
How do I check for outdated npm packages? · Package: This is the name of the package that is outdated · Current: This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found