Skip to content

Fix project creation #3615

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

Merged
merged 1 commit into from
May 25, 2018
Merged

Fix project creation #3615

merged 1 commit into from
May 25, 2018

Conversation

Fatme
Copy link
Contributor

@Fatme Fatme commented May 25, 2018

PR Checklist

What is the current behavior?

tns create template-tab-navigation-ng --template https://github.com/NativeScript/template-tab-navigation-ng#master does not work

What is the new behavior?

tns create template-tab-navigation-ng --template https://github.com/NativeScript/template-tab-navigation-ng#master works as expected

Copy link
Contributor

@rosen-vladimirov rosen-vladimirov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to note the problem is with npm 5.6.0.
The current workflow is:

  1. Create project dir and package.json
  2. Install the template as dependency of the project
  3. Move the files from the template to the project dir (or its app directory)
  4. Call npm install tns-core-modules --save in case the template does not have dependency for tns-core-modules.
  5. Read the package.json of the template installed in node_modules
  6. Call npm install at the root of the project

However, npm decides to uninstall the template on step 4. Not sure why...
At step 6, when we call npm install the template is again installed in node_modules, so we can read its package.json

@rosen-vladimirov
Copy link
Contributor

run ci

@Fatme Fatme merged commit 4c259e4 into master May 25, 2018
@Fatme Fatme deleted the fatme/fix-project-creation branch May 25, 2018 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants