NativeScript / NativeScript/nativescript-cli

hooks folder isn't generated when node_modules are present

Open
#4,544 4 comments 0 reactions 1 assignee View on GitHub

@tsonevn is already working on this.

Since Apr 17, 2019.

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

Description

@armpogart commented on Tue Apr 16 2019

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 5.3.1
  • Cross-platform modules: 5.3.1
  • Android Runtime: 5.3.1
  • iOS Runtime: 5.3.1
  • Plugin(s):

Describe the bug

When node_modules folder is present and hooks folder is not present, tns install doesn't generate it, it only generates platforms folder. That causes to build fail afterwards with not clear error message.

To Reproduce

After creating clear project remove hooks folder and run tns install.

Expected behavior
Hooks folder to be regenerated and on tns build or tns run clear message that hooks folder is not present.

Sample project

Additional context

It is usual practice to cache node_modules in CI environment which will prevent hooks folder to be generated on tns install. Also the lack of clear message and some other unrelated message caused me to debug issue for several hours.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.