Nativescript Angular - не удается создать новый проект из пользовательского шаблона - PullRequest
0 голосов
/ 30 октября 2019

Я создал собственный шаблон. Я не размещал его на Github или любой другой платформе. Шаблон находится на локальном компьютере.

Путь: C:\Users\dumyUserName\Documents\nativescript\templates\template1

Содержимое внутри этого шаблона имеет следующую структуру папок

-App_Resources
-hooks
-src
   -- app
      --- assets
      --- common
      --- directives
      --- models
      --- components
      --- pipes
      --- services
      --- shared
      --- app.component.html
      --- app.component.ts
      --- app.module.ts
      --- app-routing.module.ts
   -- fonts
   -- _app-common.scss
   -- _app-variables.scss
   -- app.android.scss
   -- app.ios.scss
   -- main.ts
   -- package.json

И когда я пытаюсь создатьновый проект с помощью команды ниже

tns create myApp --template C:\Users\dumyUserName\Documents\nativescript\templates\template1

Я получаю следующую ошибку

Command npm.cmd failed with exit code 1
# tns create

### Arguments

<App Name> is the name of project and must meet the requirements of each platform that you want to target. 
If not specified in the initial command, the NativeScript CLI will ask you for it afterwards. 
For more information about the <App Name> requirements, run $ tns help create.

Package.json

{
  "nativescript": {
    "id": "org.abcd.blank",
    "tns-ios": {
      "version": "6.0.2"
    },
    "tns-android": {
      "version": "6.0.2"
    }
  },
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "dependencies": {
    "@angular/animations": "~8.2.0",
    "@angular/common": "~8.2.0",
    "@angular/compiler": "~8.2.0",
    "@angular/core": "~8.2.0",
    "@angular/forms": "~8.2.0",
    "@angular/platform-browser": "~8.2.0",
    "@angular/platform-browser-dynamic": "~8.2.0",
    "@angular/router": "~8.2.0",
    "nativescript-angular": "~8.2.0",
    "nativescript-theme-core": "~1.0.6",
    "reflect-metadata": "~0.1.12",
    "rxjs": "^6.4.0",
    "tns-core-modules": "~6.0.0",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular/cli": "^8.3.12",
    "@angular/compiler-cli": "~8.2.0",
    "@nativescript/schematics": "^0.7.2",
    "@ngtools/webpack": "~8.2.0",
    "nativescript-dev-webpack": "~1.1.0",
    "node-sass": "^4.12.0",
    "typescript": "~3.5.3"
  },
  "gitHead": "44f4a6a9c94eaf9c68d2a41e0dbbb1a2544bc28f",
  "readme": "NativeScript Application"
}
...