Skip to content

unable to create project from template #2

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

Closed
vesper8 opened this issue Jul 2, 2017 · 16 comments
Closed

unable to create project from template #2

vesper8 opened this issue Jul 2, 2017 · 16 comments

Comments

@vesper8
Copy link

vesper8 commented Jul 2, 2017

Hi there, I am following your instructions and getting this error (See at top below)

tns create hello-ns-vue --template https://github.com/tralves/nativescript-vue-webpack-template

Support for Node.js 8.1.3 is not verified. This CLI might not install or run properly.

Installing  https://github.com/tralves/nativescript-vue-webpack-template
+ [email protected]
added 7 packages in 3.337s
cp: no such file or directory: /hello-ns-vue/node_modules/https:/github.com/tralves/nativescript-vue-webpack-template/*
# create

┌────────────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Usage                  │ Synopsis                                                                                                                                          │
│ Create from default    │ $ tns create <App Name> [--path <Directory>] [--appid <App ID>]                                                                                   │
│ JavaScript template    │                                                                                                                                                   │
│ Create from default    │ $ tns create <App Name> --template typescript [--path <Directory>] [--appid <App ID>] OR $ tns create <App Name> --tsc [--path <Directory>] [-    │
│ TypeScript template    │ -appid <App ID>] OR $ tns create <App Name> --template tsc [--path <Directory>] [--appid <App ID>]                                                │
│ Create from default    │ $ tns create <App Name> --template angular [--path <Directory>] [--appid <App ID>] OR $ tns create <App Name> --template ng [--path <Directory>]  │
│ Angular template       │ [--appid <App ID>] OR $ tns create <App Name> --ng [--path <Directory>] [--appid <App ID>]                                                        │
│ Copy from existing     │ $ tns create <App Name> [--path <Directory>] [--appid <App ID>]                                                                                   │
│ project                │                                                                                                                                                   │
│ Create from custom     │ $ tns create <App Name> [--path <Directory>] [--appid <App ID>] --template <Template>                                                             │
│ template               │                                                                                                                                                   │
└────────────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Creates a new project for native development with NativeScript.

### Options

    * --path - Specifies the directory where you want to create the project, if different from the current directory. The directory must be empty.
    * --appid - Sets the application identifier for your project.
    * --template - Specifies a valid npm package which you want to use to create your project. If --template is not set, the NativeScript CLI creates the project from the default JavaScript hello-world template.
    * --ng - Sets the template for your project to the Angular template.
    * --tsc - Sets the template for your project to the TypeScript template.

### Attributes

    * <App Name> is the name of project. The specified name must meet the requirements of all platforms that you want to target. For more information about the <App Name> requirements, run $ tns help create
    * <App ID> is the application identifier for your project. It must be a domain name in reverse and must meet the requirements of all platforms that you want to target. If not specified, the application identifier is set to org.nativescript.<App name> For more information about the <App ID> requirements, run $ tns help create

did the create syntax change? Would appreciate your help with this. Thanks!

@jqEmprendedorVE
Copy link

I have they same issue

@tralves
Copy link
Owner

tralves commented Aug 8, 2017

What is your OS and node?

Working for me on macOS, node 6.9.5.

@jqEmprendedorVE
Copy link

My OS is Win7 and my node is v7.10.0

@evanfuture
Copy link

Better question is which tns --version are you running? I found this error which was fixed somewhat recently: NativeScript/nativescript-cli#2870

@jqEmprendedorVE
Copy link

jqEmprendedorVE commented Aug 20, 2017

Hello friends

Until today I was able to try. I updated my version of tns to be able to install this template. I already installed the template without problems on windows

My OS: Windows 7 Pro
Node: v7.10.0
Npm 5.3.0
Tns 3.1.3

Effectively, i reviewed my tns's version and and updated, this solve my problem. To update tns's version is solution for close this issue

Thank you,

@ukik
Copy link

ukik commented Sep 28, 2017

Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. All rights reserved.

D:\NATIVESCRIPT>tns create hello-ns-vue --template https://github.com/tralves/nativescript-vue-webpack-template
Installing https://github.com/tralves/nativescript-vue-webpack-template
Command npm.cmd install https://github.com/tralves/nativescript-vue-webpack-template --silent --save-exact --save failed with exit code 1

create

┌───────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Usage │ Synopsis │
│ Create from default │ $ tns create [--path ] [--appid ] │
│ JavaScript template │ │
│ Create from default │ $ tns create --template typescript [--path ] [--appid ] OR $ tns create --tsc [--path │
│ TypeScript template │ ] [--appid ] OR $ tns create --template tsc [--path ] [--appid ] │
│ Create from default │ $ tns create --template angular [--path ] [--appid ] OR $ tns create --template ng [--path │
│ Angular template │ ] [--appid ] OR $ tns create --ng [--path ] [--appid ] │
│ Copy from existing │ $ tns create [--path ] [--appid ] │
│ project │ │
│ Create from custom │ $ tns create [--path ] [--appid ] --template │
│ template │ │
└───────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Creates a new project for native development with NativeScript.

Options

* --path - Specifies the directory where you want to create the project, if different from the current directory. The directory must be empty.
* --appid - Sets the application identifier for your project.
* --template - Specifies a valid npm package which you want to use to create your project. If --template is not set, the NativeScript CLI creates the project from the default JavaScript hello-world template.
* --ng - Sets the template for your project to the Angular template.
* --tsc - Sets the template for your project to the TypeScript template.

Attributes

* <App Name> is the name of project. The specified name must meet the requirements of all platforms that you want to target. For more information about the <App Name> requirements, run $ tns help create
* <App ID> is the application identifier for your project. It must be a domain name in reverse and must meet the requirements of all platforms that you want to target. If not specified, the application identifier is set to org.nativescript.<App name> For more information about the <App ID> requirements, run $ tns help create

@jqEmprendedorVE
Copy link

jqEmprendedorVE commented Sep 28, 2017

@ukik are you using windows?

@ukik
Copy link

ukik commented Sep 28, 2017 via email

@jqEmprendedorVE
Copy link

i had some error... try to use this command npm install https://github.com/tralves/nativescript-vue-webpack-template --silent --save-exact --save

For some reason in windows npm.cmd don't work, execute this command without .cmd. I think this could be a new issue to repair in this package to able install at windows @tralves

@ukik
Copy link

ukik commented Sep 28, 2017

please with step by step procedure, cause this solution exclude tns create, if i use tns create then by default tns will use typescript template

then how to use solution above

@ukik
Copy link

ukik commented Sep 28, 2017

below is my interpretation by so far

  1. I create vue-nativescript project normally
  2. Then I run this: npm install https://github.com/tralves/nativescript-vue-webpack-template --silent --save-exact --save inside my project

correct or not

@jqEmprendedorVE
Copy link

jqEmprendedorVE commented Sep 28, 2017

Forget my last suggestion

Well,
i tried to run the installer again to get this error but this time i tried to use git bash, will you have it installed?

With git bash i came execute fine, without errors

@ukik
Copy link

ukik commented Sep 28, 2017

when I run: npm run build-android-bundle --uglify --snapshot

BUILD SUCCESSFUL

Total time: 16.258 secs
Running webpack for android...
module.js:440
throw err;
^

Error: Cannot find module 'merge-files-webpack-plugin'
at Function.Module._resolveFilename (module.js:438:15)
at Function.Module._load (module.js:386:25)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Object. (D:\NATIVESCRIPT\Vue\webpack.config.js:8:24)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at requireConfig (D:\NATIVESCRIPT\Vue\node_modules\webpack\bin\convert-argv. js:97:18)
at D:\NATIVESCRIPT\Vue\node_modules\webpack\bin\convert-argv.js:104:17
at Array.forEach (native)
at module.exports (D:\NATIVESCRIPT\Vue\node_modules\webpack\bin\convert-argv .js:102:15)
child process exited with code 1

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\ node_modules\npm\bin\npm-cli.js" "run" "ns-bundle" "--android" "--build-app"
npm ERR! node v6.1.0
npm ERR! npm v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! @ ns-bundle: ns-bundle
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ ns-bundle script 'ns-bundle'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ns-bundle
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! D:\NATIVESCRIPT\Vue\npm-debug.log

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\ node_modules\npm\bin\npm-cli.js" "run" "build-android-bundle" "--uglify"
npm ERR! node v6.1.0
npm ERR! npm v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! @ build-android-bundle: npm run ns-bundle --android --build-app
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ build-android-bundle script 'npm run ns-bundle --androi d --build-app'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run ns-bundle --android --build-app
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! D:\NATIVESCRIPT\Vue\npm-debug.log

@ukik
Copy link

ukik commented Sep 28, 2017

i am waiting ready use vue-webpack nativescript with basic template hello world
honestly my knowledge with webpack just basic user, so when find error lots I am stuck

@tralves
Copy link
Owner

tralves commented Sep 28, 2017

Hi!

The right way to use this template is with tns create hello-ns-vue --template https://github.com/tralves/nativescript-vue-webpack-template.

That error could be related to tns itself. Please update the tools.

In any case, I suggest you try the template https://github.com/tralves/nativescript-vue-rollup-template. It uses rollup instead of webpack. It is simpler and allows live reload. Please follow the instructions in the README of the project.

@ukik
Copy link

ukik commented Sep 29, 2017 via email

@tralves tralves closed this as completed Nov 12, 2017
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

No branches or pull requests

5 participants