Nest-cli: nest update: not updating the package.json file

Created on 10 Oct 2019  路  9Comments  路  Source: nestjs/nest-cli

I'm submitting a...


[ ] Regression 
[ ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

nest upate command not updating the version package.json file but it is only updating in yarn.lock file.

Expected behavior


It should update the package.json file with respective versions

Minimal reproduction of the problem with instructions


image

What is the motivation / use case for changing the behavior?

Environment

[System Information]
OS Version     : Linux 5.0
NodeJS Version : v10.16.3
YARN Version    : 1.17.3
[Nest Information]
platform-express version : 6.7.2
common version           : 6.7.2
core version             : 6.7.2
PRs open improvement

Most helpful comment

Hey everyone, I will look into this on weekend.

All 9 comments

Any updates on this one? yarn outdated and nest update seem broken in newly scaffolded nest apps. I have an old one where (for some reason) 'yarn outdated' still works but 'nest u' just updates the lock file.

NOTE: my nest version is 6.12.9

same here, nest update only updates the package-lock file but the package.json remains unchanged

I am still encountering this issue with nest 6.14, upgrading to nest 7.0.2 is not possible

Is someone working on this issue? This still exists in the latest version of next-cli.

Hey everyone, I will look into this on weekend.

@santoshyadav198613 any update on this?

same to me with

[System Information]
OS Version     : macOS Catalina
NodeJS Version : v15.3.0
NPM Version    : 7.0.14 

[Nest CLI]
Nest CLI Version : 7.5.4 

[Nest Platform Information]
microservices version : 7.4.4
mongoose version      : 7.0.2
common version        : 7.4.4
config version        : 0.6.1
core version          : 7.4.4

This issue corresponds to the package managers (npm, yarn).
yarn upgrade and npm upgrade commands doesn't change a dependencies versions in package.json. They changed only in yarn.lock or package-lock.json

We can use something like npm-check-updates to update all dependencies to the latest version.

By the way, in Nest CLI documentation sayed, that nest update command must change all corresponding dependencies to the latest version. But we can use -t flag for set an other than latest tag.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

prateekkathal picture prateekkathal  路  5Comments

rweisse picture rweisse  路  5Comments

jylin picture jylin  路  5Comments

iangregsondev picture iangregsondev  路  6Comments

alexbuczynsky picture alexbuczynsky  路  5Comments