tessel / t1-cli

[UNMAINTAINED] Command line interface to Tessel 1.
Other
25 stars 21 forks source link

CLI can't find shared package dependency #11

Closed zankich closed 10 years ago

zankich commented 10 years ago

The CLI is not accepting a package dependency which exists higher up in the node_modules directory structure.

cylon, cylon-gpio and cylon-tessel all have node-namespace as a dependency.

NPM installs node-namespace in the cylon-tessel node_modules and shares that dependency between cylon and cylon-gpio. The CLI however will not accept this shared node-namespace dependency and is expecting to find it in the node_modules directory of each cylon and cylon-gpio.

cylon, cylon-gpio and cylon-tessel all have this setting in their package.json

"hardware": {
  "*": true,
   "./": true
},

so the cli should pick up everything.

Here's the output of my tessel push as well as my npm ls

$ tessel push index.js 
TESSEL! Connected to /dev/ttyACM0.          

fs.js:654
  return binding.readdir(pathModule._makeLong(path));
                 ^
Error: ENOENT, no such file or directory '/home/adrian/development/hybridgroup/cylon/cylon-tessel-example/node_modules/cylon-tessel/node_modules/cylon/node_modules/node-namespace'
    at Object.fs.readdirSync (fs.js:654:18)
    at Object.readdirRecursiveSync (/home/adrian/development/tessel/cli/node_modules/effess/effess.js:19:18)
    at list (/home/adrian/development/tessel/cli/node_modules/hardware-resolve/index.js:68:10)
    at /home/adrian/development/tessel/cli/node_modules/hardware-resolve/index.js:112:26
    at Array.forEach (native)
    at list (/home/adrian/development/tessel/cli/node_modules/hardware-resolve/index.js:111:27)
    at /home/adrian/development/tessel/cli/node_modules/hardware-resolve/index.js:112:26
    at Array.forEach (native)
    at list (/home/adrian/development/tessel/cli/node_modules/hardware-resolve/index.js:111:27)
    at /home/adrian/development/tessel/cli/node_modules/hardware-resolve/index.js:112:26
$ npm ls
cylon-tessel-example@0.0.0 /home/adrian/development/hybridgroup/cylon/cylon-tessel-example
└─┬ cylon-tessel@0.1.0 (git://github.com/hybridgroup/cylon-tessel.git#a745935fff563015a7858094bebcdbf88c949e92)
  ├─┬ cylon@0.9.2
  │ ├── async@0.2.10
  │ ├── commander@2.1.0
  │ ├── ejs@0.8.5
  │ ├─┬ express.io@1.1.13
  │ │ ├── async@0.1.22
  │ │ ├── coffee-script@1.4.0
  │ │ ├─┬ express@3.4.8
  │ │ │ ├── buffer-crc32@0.2.1
  │ │ │ ├─┬ commander@1.3.2
  │ │ │ │ └── keypress@0.1.0
  │ │ │ ├─┬ connect@2.12.0
  │ │ │ │ ├── batch@0.5.0
  │ │ │ │ ├── bytes@0.2.1
  │ │ │ │ ├─┬ multiparty@2.2.0
  │ │ │ │ │ ├─┬ readable-stream@1.1.10
  │ │ │ │ │ │ ├── core-util-is@1.0.1
  │ │ │ │ │ │ └── debuglog@0.0.2
  │ │ │ │ │ └── stream-counter@0.2.0
  │ │ │ │ ├── negotiator@0.3.0
  │ │ │ │ ├── pause@0.0.1
  │ │ │ │ ├── qs@0.6.6
  │ │ │ │ ├── raw-body@1.1.2
  │ │ │ │ └── uid2@0.0.3
  │ │ │ ├── cookie@0.1.0
  │ │ │ ├── cookie-signature@1.0.1
  │ │ │ ├── debug@0.7.4
  │ │ │ ├── fresh@0.2.0
  │ │ │ ├── merge-descriptors@0.0.1
  │ │ │ ├── methods@0.1.0
  │ │ │ ├── mkdirp@0.3.5
  │ │ │ ├── range-parser@0.0.4
  │ │ │ └─┬ send@0.1.4
  │ │ │   └── mime@1.2.11
  │ │ ├─┬ socket.io@0.9.16
  │ │ │ ├── base64id@0.1.0
  │ │ │ ├── policyfile@0.0.4
  │ │ │ ├── redis@0.7.3
  │ │ │ └─┬ socket.io-client@0.9.16
  │ │ │   ├─┬ active-x-obfuscator@0.0.1
  │ │ │   │ └── zeparser@0.0.5
  │ │ │   ├── uglify-js@1.2.5
  │ │ │   ├─┬ ws@0.4.31
  │ │ │   │ ├── commander@0.6.1
  │ │ │   │ ├── nan@0.3.2
  │ │ │   │ ├── options@0.0.5
  │ │ │   │ └── tinycolor@0.0.1
  │ │ │   └── xmlhttprequest@1.4.2
  │ │ └── underscore@1.4.3
  │ ├─┬ glob@3.2.8
  │ │ ├── inherits@2.0.1
  │ │ └─┬ minimatch@0.2.14
  │ │   ├── lru-cache@2.5.0
  │ │   └── sigmund@1.0.0
  │ ├── robeaux@0.0.2
  │ └── wrench@1.5.6
  ├── cylon-gpio@0.8.1
  └── node-namespace@1.0.0
zankich commented 10 years ago

I think this was actually a problem in the way I had my project configured....