Closed jurasec closed 9 years ago
@stewart or @solojavier this appears to be a Mac related error, can you take a look at this
Hi @jurasec - this appears to be a paths issue, can you try re-installing the Cylon CLI and trying again?
$ npm uninstall -g cylon-cli
$ npm install -g cylon-cli
$ cylon generate tessel my-tessel-project
Please et me know if this generates the same error.
Hi @stewart, thanks for your time; I tried again and generates the same error:
MacBook-Pro-de-Julio:tessel jcrodriguez$ ls
blink.js blinkCylon.js node_modules npm-debug.log
MacBook-Pro-de-Julio:tessel jcrodriguez$ sudo npm uninstall -g cylon-cli
Password:
unbuild cylon-cli@0.9.1
MacBook-Pro-de-Julio:tessel jcrodriguez$ npm install -g cylon-cli
npm http GET https://registry.npmjs.org/cylon-cli
npm http 200 https://registry.npmjs.org/cylon-cli
npm http GET https://registry.npmjs.org/restler
npm http GET https://registry.npmjs.org/ejs
npm http GET https://registry.npmjs.org/globule
npm http 200 https://registry.npmjs.org/globule
npm http 200 https://registry.npmjs.org/ejs
npm http 200 https://registry.npmjs.org/restler
npm http GET https://registry.npmjs.org/xml2js/0.4.0
npm http GET https://registry.npmjs.org/yaml/0.2.3
npm http GET https://registry.npmjs.org/iconv-lite/0.2.11
npm http GET https://registry.npmjs.org/qs/0.6.6
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/qs/0.6.6
npm http 200 https://registry.npmjs.org/xml2js/0.4.0
npm http GET https://registry.npmjs.org/xml2js/-/xml2js-0.4.0.tgz
npm http 304 https://registry.npmjs.org/minimatch
npm http 200 https://registry.npmjs.org/yaml/0.2.3
npm http GET https://registry.npmjs.org/yaml/-/yaml-0.2.3.tgz
npm http 200 https://registry.npmjs.org/lodash
npm http 200 https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http 200 https://registry.npmjs.org/xml2js/-/xml2js-0.4.0.tgz
npm http GET https://registry.npmjs.org/inherits
npm http 200 https://registry.npmjs.org/iconv-lite/0.2.11
npm http 200 https://registry.npmjs.org/yaml/-/yaml-0.2.3.tgz
npm http GET https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/inherits
npm http 200 https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz
npm http GET https://registry.npmjs.org/xmlbuilder
npm http GET https://registry.npmjs.org/sax
npm http 200 https://registry.npmjs.org/xmlbuilder
npm http 200 https://registry.npmjs.org/sax
npm http GET https://registry.npmjs.org/lodash-node
npm http 200 https://registry.npmjs.org/lodash-node
/Users/jcrodriguez/local/bin/cylon -> /Users/jcrodriguez/local/lib/node_modules/cylon-cli/bin/cylon
cylon-cli@0.9.1 /Users/jcrodriguez/local/lib/node_modules/cylon-cli
├── ejs@0.8.8
├── globule@0.2.0 (lodash@2.4.1, minimatch@0.2.14, glob@3.2.11)
└── restler@3.2.2 (qs@0.6.6, yaml@0.2.3, iconv-lite@0.2.11, xml2js@0.4.0)
MacBook-Pro-de-Julio:tessel jcrodriguez$ cylon generate tessel my-tessel-project
Creating new Tessel-ready robot in ./my-tessel-project
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
{ [Error: Command failed: usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
] killed: false, code: 64, signal: null }
MacBook-Pro-de-Julio:tessel jcrodriguez$ ls
blink.js blinkCylon.js node_modules
MacBook-Pro-de-Julio:tessel jcrodriguez$
At a guess, it's an oddball issue when the generator's trying to find the path to either the target or source directory. Since I can't replicate the issue, I've made a custom branch to debug this, can you try to install and test it?
$ npm uninstall -g cylon-cli
$ npm install -g git://github.com/hybridgroup/cylon-cli.git#jurasec-debug
$ cylon generate tessel my-tessel-project
It should generate some extra debug logging, can you post that?
λ cylon generate tessel my-tessel-project
process.cwd -> /Users/stewart/dev/cylon-cli
name -> my-tessel-project
__dirname -> /Users/stewart/dev/cylon-cli/lib/commands
template_dir -> /Users/stewart/dev/cylon-cli/lib/commands/support/generate/tessel
destination_dir -> /Users/stewart/dev/cylon-cli/my-tessel-project
command -> cp -R /Users/stewart/dev/cylon-cli/lib/commands/support/generate/tessel /Users/stewart/dev/cylon-cli/my-tessel-project
Yep, this is the output:
MacBook-Pro-de-Julio:tessel jcrodriguez$ npm uninstall -g cylon-cli
unbuild cylon-cli@0.9.1
MacBook-Pro-de-Julio:tessel jcrodriguez$ npm install -g git://github.com/hybridgroup/cylon-cli.git#jurasec-debug
npm http GET https://registry.npmjs.org/ejs
npm http GET https://registry.npmjs.org/globule
npm http GET https://registry.npmjs.org/restler
npm http 304 https://registry.npmjs.org/globule
npm http 304 https://registry.npmjs.org/restler
npm http 304 https://registry.npmjs.org/ejs
npm http GET https://registry.npmjs.org/qs/0.6.6
npm http GET https://registry.npmjs.org/xml2js/0.4.0
npm http GET https://registry.npmjs.org/yaml/0.2.3
npm http GET https://registry.npmjs.org/iconv-lite/0.2.11
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/qs/0.6.6
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/yaml/0.2.3
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/iconv-lite/0.2.11
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/xml2js/0.4.0
npm http GET https://registry.npmjs.org/sax
npm http GET https://registry.npmjs.org/xmlbuilder
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/sax
npm http 304 https://registry.npmjs.org/xmlbuilder
npm http GET https://registry.npmjs.org/lodash-node
npm http 304 https://registry.npmjs.org/lodash-node
/Users/jcrodriguez/local/bin/cylon -> /Users/jcrodriguez/local/lib/node_modules/cylon-cli/bin/cylon
cylon-cli@0.9.1 /Users/jcrodriguez/local/lib/node_modules/cylon-cli
├── ejs@0.8.8
├── globule@0.2.0 (lodash@2.4.1, minimatch@0.2.14, glob@3.2.11)
└── restler@3.2.2 (qs@0.6.6, yaml@0.2.3, iconv-lite@0.2.11, xml2js@0.4.0)
MacBook-Pro-de-Julio:tessel jcrodriguez$ cylon generate tessel my-tessel-project
process.cwd -> /Users/jcrodriguez/Documents/JuraseC/NodeBots México/tessel
name -> my-tessel-project
__dirname -> /Users/jcrodriguez/local/lib/node_modules/cylon-cli/lib/commands
template_dir -> /Users/jcrodriguez/local/lib/node_modules/cylon-cli/lib/commands/support/generate/tessel
destination_dir -> /Users/jcrodriguez/Documents/JuraseC/NodeBots México/tessel/my-tessel-project
command -> cp -R /Users/jcrodriguez/local/lib/node_modules/cylon-cli/lib/commands/support/generate/tessel /Users/jcrodriguez/Documents/JuraseC/NodeBots México/tessel/my-tessel-project
Creating new Tessel-ready robot in ./my-tessel-project
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
{ [Error: Command failed: usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
] killed: false, code: 64, signal: null }
MacBook-Pro-de-Julio:tessel jcrodriguez$ ls
blink.js blinkCylon.js node_modules
MacBook-Pro-de-Julio:tessel jcrodriguez$
Seems to be an issue with spaces in pathnames, just pushed another commit that removes the logging but should fix the issue. Can you please confirm? Same instructions as my last comment.
yey!, this is working now :-] Thanks @stewart for your support!
MacBook-Pro-de-Julio:tessel jcrodriguez$ npm uninstall -g cylon-cli
unbuild cylon-cli@0.9.1
MacBook-Pro-de-Julio:tessel jcrodriguez$ npm install -g git://github.com/hybridgroup/cylon-cli.git#jurasec-debug
npm http GET https://registry.npmjs.org/globule
npm http GET https://registry.npmjs.org/restler
npm http GET https://registry.npmjs.org/ejs
npm http 304 https://registry.npmjs.org/restler
npm http 304 https://registry.npmjs.org/globule
npm http 304 https://registry.npmjs.org/ejs
npm http GET https://registry.npmjs.org/qs/0.6.6
npm http GET https://registry.npmjs.org/xml2js/0.4.0
npm http GET https://registry.npmjs.org/yaml/0.2.3
npm http GET https://registry.npmjs.org/iconv-lite/0.2.11
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/qs/0.6.6
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/yaml/0.2.3
npm http 304 https://registry.npmjs.org/iconv-lite/0.2.11
npm http 304 https://registry.npmjs.org/xml2js/0.4.0
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/sax
npm http GET https://registry.npmjs.org/xmlbuilder
npm http GET https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/sax
npm http 304 https://registry.npmjs.org/xmlbuilder
npm http GET https://registry.npmjs.org/lodash-node
npm http 304 https://registry.npmjs.org/lodash-node
/Users/jcrodriguez/local/bin/cylon -> /Users/jcrodriguez/local/lib/node_modules/cylon-cli/bin/cylon
cylon-cli@0.9.1 /Users/jcrodriguez/local/lib/node_modules/cylon-cli
├── ejs@0.8.8
├── globule@0.2.0 (lodash@2.4.1, minimatch@0.2.14, glob@3.2.11)
└── restler@3.2.2 (qs@0.6.6, yaml@0.2.3, iconv-lite@0.2.11, xml2js@0.4.0)
MacBook-Pro-de-Julio:tessel jcrodriguez$ cylon generate tessel my-tessel-project
Creating new Tessel-ready robot in ./my-tessel-project
MacBook-Pro-de-Julio:tessel jcrodriguez$ ls
blink.js blinkCylon.js my-tessel-project node_modules
MacBook-Pro-de-Julio:tessel jcrodriguez$ ls my-tessel-project/
blink.js package.json
MacBook-Pro-de-Julio:tessel jcrodriguez$ cat my-tessel-project/package.json
{
"name": "my-tessel-project",
"version": "0.0.0",
"main": "index.js",
"description": "my-tessel-project",
"author": {
"name": "your name here",
"email": "your email here",
"url": "your site here"
},
"hardware": {
"*": true,
"./": true
},
"repository": {
"type": "git",
"url": "your git uri here"
},
"licenses": [
{ "type": "your license here" }
],
"dependencies": {
"cylon": "~0.18.0",
"cylon-gpio": "~0.18.0",
"cylon-tessel": "~0.5.0",
"cylon-i2c": "~0.14.0"
}
}
MacBook-Pro-de-Julio:tessel jcrodriguez$
Hi, I'm testing Cylon with tessel, but I can't generate the project: cylon generate tessel my-tessel-project
Creating new Tessel-ready robot in ./my-tessel-project
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
{ [Error: Command failed: usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory ] killed: false, code: 64, signal: null }
My OS versión is: Mac OSX 10.9.4
node & npm ls
Can you help me, please?
Thanks!