cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Athorcis (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-7928) --copy-from fails with "SyntaxError: Unexpected token -"
Date Wed, 24 Dec 2014 16:42:13 GMT

    [ https://issues.apache.org/jira/browse/CB-7928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14258363#comment-14258363
] 

Athorcis commented on CB-7928:
------------------------------

The first hyphen in your command is actually a dash, that's why it doesn't work.
Try that instead:
cordova create name com.name.app NAME --copy-from ~/Cordova/Cordova-4.0.0-Examples/Cordova-Examples/barcode/

> --copy-from fails with "SyntaxError: Unexpected token -"
> --------------------------------------------------------
>
>                 Key: CB-7928
>                 URL: https://issues.apache.org/jira/browse/CB-7928
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 4.0.0
>         Environment: MacOS 10.9.5
>            Reporter: Craig Payne
>            Priority: Minor
>
> {code}
> $ cordova create name com.name.app NAME —-copy-from ~/Cordova/Cordova-4.0.0-Examples/Cordova-Examples/barcode/
> SyntaxError: Unexpected token —
>     at Object.parse (native)
>     at cli (/usr/local/lib/node_modules/cordova/src/cli.js:230:24)
>     at Object.<anonymous> (/usr/local/lib/node_modules/cordova/bin/cordova:41:1)
>     at Module._compile (module.js:456:26)
>     at Object.Module._extensions..js (module.js:474:10)
>     at Module.load (module.js:356:32)
>     at Function.Module._load (module.js:312:12)
>     at Function.Module.runMain (module.js:497:10)
>     at startup (node.js:119:16)
>     at node.js:902:3
> $ cordova -v
> 4.0.0
> {code}
> I have a fresh copy of The Examples:
> $ git clone https://github.com/cfjedimaster/Cordova-Examples.git 
> Cloning into 'Cordova-Examples'...
> remote: Counting objects: 191, done.
> remote: Total 191 (delta 0), reused 0 (delta 0)
> Receiving objects: 100% (191/191), 1.19 MiB | 512.00 KiB/s, done.
> Resolving deltas: 100% (35/35), done.
> Checking connectivity... done.
> $
> I had just updated (cleanly on the 3rd try) to Cordova 4.0.0.  My copy of cli.js has
this at line 230:
> {code}
>     } else if (cmd == 'create') {
>         var cfg = {};
>         // If we got a fourth parameter, consider it to be JSON to init the config.
>         if ( undashed[4] ) {
>             cfg = JSON.parse(undashed[4]);  <--- line 230
>         }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message