Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nest info cli command fails to read package.json after update to 6.11.5 (from 6.11.3) #455

Closed
AcidSlide opened this issue Nov 10, 2019 · 2 comments

Comments

@AcidSlide
Copy link

Bug Report

nest info fails to read package.json after updating nestjs to 6.11.5

Current behavior

Tried running
nest info

Got this

 _   _             _      ___  _____  _____  _     _____
| \ | |           | |    |_  |/  ___|/  __ \| |   |_   _|
|  \| |  ___  ___ | |_     | |\ `--. | /  \/| |     | |
| . ` | / _ \/ __|| __|    | | `--. \| |    | |     | |
| |\  ||  __/\__ \| |_ /\__/ //\__/ /| \__/\| |_____| |_
\_| \_/ \___||___/ \__|\____/ \____/  \____/\_____/\___/


[System Information]
OS Version     : Linux 5.0
NodeJS Version : v10.15.2
NPM Version    : 6.13.0
[Nest Information]
😼  cannot read your project package.json file, are you inside your project directory?

And yes, I am inside the root folder of my project directory! And yes, I run the same command, in the same project, machine, and root directory before the update (while in version 6.11.3), and it was working then.

Same issue, using Windows environment

>nest --version
6.11.5

>nest info
 _   _             _      ___  _____  _____  _     _____
| \ | |           | |    |_  |/  ___|/  __ \| |   |_   _|
|  \| |  ___  ___ | |_     | |\ `--. | /  \/| |     | |
| . ` | / _ \/ __|| __|    | | `--. \| |    | |     | |
| |\  ||  __/\__ \| |_ /\__/ //\__/ /| \__/\| |_____| |_
\_| \_/ \___||___/ \__|\____/ \____/  \____/\_____/\___/


[System Information]
OS Version     : Windows 10
NodeJS Version : v10.16.3
NPM Version    : 6.12.0
[Nest Information]
�  cannot read your project package.json file, are you inside your project directory?

Expected behavior

Should return something like this

$ nest --version
6.11.3

$ nest info
 _   _             _      ___  _____  _____  _     _____
| \ | |           | |    |_  |/  ___|/  __ \| |   |_   _|
|  \| |  ___  ___ | |_     | |\ `--. | /  \/| |     | |
| . ` | / _ \/ __|| __|    | | `--. \| |    | |     | |
| |\  ||  __/\__ \| |_ /\__/ //\__/ /| \__/\| |_____| |_
\_| \_/ \___||___/ \__|\____/ \____/  \____/\_____/\___/


[System Information]
OS Version     : Linux 4.15
NodeJS Version : v8.10.0
NPM Version    : 6.13.0
[Nest Information]
platform-express version : 6.7.2
platform-fastify version : 6.9.0
passport version         : 6.1.0
swagger version          : 3.1.0
typeorm version          : 6.2.0
common version           : 6.7.2
core version             : 6.7.2
jwt version              : 6.1.1

Environment


Nest version: 6.11.5

 
For Tooling issues:
- Node version: v10.15.2  
- Platform:  Linux (Ubunut 19.04), Windows 10 

Others:

@kamilmysliwiec kamilmysliwiec transferred this issue from nestjs/nest Nov 12, 2019
@kamilmysliwiec
Copy link
Member

I can't really reproduce your issue. I don't think we changed anything related to nest info between these patches. @johnbiundo can you test on windows?

@AcidSlide
Copy link
Author

AcidSlide commented Nov 12, 2019

@kamilmysliwiec @johnbiundo
I think I found the issue, the following got deleted from package.json (under "dependencies")

    "@nestjs/common": "^6.7.2",
    "@nestjs/core": "^6.7.2",
    "@nestjs/jwt": "^6.1.1",
    "@nestjs/passport": "^6.1.0",
    "@nestjs/platform-express": "^6.7.2",
    "@nestjs/platform-fastify": "^6.9.0",
    "@nestjs/swagger": "^3.1.0",
    "@nestjs/typeorm": "^6.2.0",

It got deleted when I tried running nest update -t latest -f in my windows development machine. The message Installation (something) (sorry can't remember the exact message in the terminal) was there for more than 10mins already, then I cancelled it. [This is due I think to a running issue in Windows CMD handling HTTPS requests (Reference: node-sass #issue:2773, MicrosoftCommunity, stackoverflow.com)]

My project files gets synced (automatically) to my test server which is a Ubuntu 19.04 server. So seeing as if the update failed in my Windows machine, i tried running the same update command nest update -t latest -f in the test server.

That is when I tried running nest info and seeing it failed, I synced back the files from the Ubuntu test server back to my Windows dev machine.

Only realizing the real issue, when I tried running the nest app, which failed so much because of the missing modules. I reverted back to the working package.json and re-run the update first on the Ubuntu server before syncing back to my windows machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants