NativeScript / NativeScript/nativescript-cli

Self tns validation...

Open
#1,728 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature hacktoberfest help wanted
Dominant language
JavaScript
Stars
1.1k
Forks
204
Avg merge
1d 9h
Merged PRs (30d)
8

Description

I've seen this issue occur the last several times I've upgraded the nativescript command on my Macintosh. I haven't seen this on my windows 7 box.

It installs, and gives me the normal list of all the modules it has installed; but it does not run any of the post-install stuff. However, the install is bad, some modules are missing even though it "appears" like everything installed properly (because of the list of all the modules it just installed successfully is long).

Running TNS will work in some cases; but in most cases depending on which module wasn't installed it will fail at that point with random errors.

I am recommending that on install part of the post install step would be to load each npm module that you are depending upon in a try catch and verify they all exist properly. Then set a flag to the current version. On startup of the tns command, see if this flag is set to the current version, if it isn't set then run this check. In this way you can at least tell the end user that the install is bad and to reinstall tns command.

If others are running into this; it is very confusing why it "appears" to have installed but it is broken in random places. I've learned from using tns for a long time that if it doesn't run the post install checks just to do another "npm install -g nativescript" until it actually runs the post install scripts...

Please note I do realize this could be an issue with my Node/Npm version so I'm going to leave this info here in case others run into this. I plan updating both to the latest 5.x release later so we shall see ...
Node v5.11, npm v3.32

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by reproducing the global installation on macOS with Node v5.11 and npm v3.32, then trace whether post-install validation runs and whether required modules load; done would include a clear failure signal when installation is incomplete.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.