nativescript-cli
nativescript-cli copied to clipboard
ns doctor gets stuck on "Getting environment information"
New project. ns doctor gets stuck on "Getting environment information" I've find out that the method getNodeGypVersion() { return this.getValueForProperty(() => this.nodeGypVerCache, () => __awaiter(this, void 0, void 0, function* () { const output = yield this.execCommand("node-gyp -v"); return output ? this.getVersionFromString(output) : null; })); } in file \AppData\Roaming\npm\node_modules\nativescript\node_modules@nativescript\doctor\lib\sys-info.js gets stuck. on the line const output = yield this.execCommand("node-gyp -v");
If return null from the method, everything works.
Got the same issue in a Windows environment.
Fixed it by updating node-gyp using the following command:
npm i node-gyp -g
Had this issue, a nightmare took ages to find the issue...
- check your environment variables path for this: C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\run-script\lib\node-gyp-bin
- remove it
- restart cmd
- retry tns doctor