NPM outdated results different from locally

I created a GitHub action to run “npm outdated” during my workflows, if I have wanted update then I just output the results to the action.

I don’t understand why, but I do not have the same results locally and when I run it in the github action.

Locally
@google-cloud/error-reporting 2.0.0 2.0.1 2.0.1 node_modules/@google-cloud/error-reporting
@google-cloud/trace-agent 5.1.1 5.1.2 5.1.2 node_modules/@google-cloud/trace-agent
@types/express 4.17.10 4.17.11 4.17.11 node_modules/@types/express
@types/helmet 0.0.48 0.0.48 4.0.0 node_modules/@types/helmet
@types/node 14.14.20 14.14.25 14.14.25 node_modules/@types/node
@typescript-eslint/eslint-plugin 4.13.0 4.14.2 4.14.2 node_modules/@typescript-eslint/eslint-plugin
@typescript-eslint/parser 4.13.0 4.14.2 4.14.2 node_modules/@typescript-eslint/parser
date-fns 2.16.1 2.17.0 2.17.0 node_modules/date-fns
eslint 7.17.0 7.19.0 7.19.0 node_modules/eslint
eslint-config-prettier 6.15.0 6.15.0 7.2.0 node_modules/eslint-config-prettier
eslint-plugin-jest 23.20.0 23.20.0 24.1.3 node_modules/eslint-plugin-jest
helmet 4.3.1 4.4.1 4.4.1 node_modules/helmet
prom-client 13.0.0 13.1.0 13.1.0 node_modules/prom-client
ts-jest 26.4.4 26.5.0 26.5.0 node_modules/ts-jest

GitHub action
@types/helmet 0.0.48 0.0.48 4.0.0 node_modules/@types/helmet
date-fns 2.16.1 2.17.0 2.17.0 node_modules/date-fns
eslint-config-prettier 6.15.0 6.15.0 7.2.0 node_modules/eslint-config-prettier
eslint-plugin-jest 23.20.0 23.20.0 24.1.3 node_modules/eslint-plugin-jest

Anyone ever had this problem by any chance?

Hi there;

Please check your node and npm version by running the following:

node -v
npm -v

Remember NodeJS version is matter. check what version of NodeJS you installed at your GitHub Actions.

and also please check the package.json and package-lock.json files.
You can easily access to package-lock file at the Action running, if this was hard for you, you can also create a new PR at the Actions so after that you can carefully check Actions files and compare these.

Best;