tessel / t2-cli

Tessel 2 Command Line Interface
MIT License
114 stars 56 forks source link

WARN Pre-compiled module is missing: usb (it's happening again, sorry) when requiring tessel v0.3.24 #724

Closed sanderblue closed 8 years ago

sanderblue commented 8 years ago

When requiring the latest version of the node module tessel (tessel@0.3.24 node_modules/tessel), I can't deploy my code to Tessel 2.

The code that's causing the main problem seems to be the following. I can build and deploy without issues if I remove this line of code.

var tessel = require('tessel');

Precompile error

WARN Pre-compiled module is missing: usb

Module error

Error: Cannot find module '/tmp/remote-script/node_modules/tessel/node_modules/usb/src/binding/usb_bindings.node'

Full console output

localhost:base-device sblue$ t2 run index.js
INFO Looking for your Tessel...
INFO Connected to Ramses.
INFO Building project.
WARN Pre-compiled module is missing: fsevents.
This might be caused by any of the following:

1. The binary is platform specific and cannot be compiled for OpenWRT.
2. A pre-compiled binary has not yet been generated for this module.
3. The binary didn't compile correctly for the platform that you're developing on.
    It's possible that the binary is Linux-only or even OpenWRT specific,
    try npm installing with "--force" and rerun your deployment command.

Please file an issue at https://github.com/tessel/t2-cli/issues/new
WARN Pre-compiled module is missing: usb.
This might be caused by any of the following:

1. The binary is platform specific and cannot be compiled for OpenWRT.
2. A pre-compiled binary has not yet been generated for this module.
3. The binary didn't compile correctly for the platform that you're developing on.
    It's possible that the binary is Linux-only or even OpenWRT specific,
    try npm installing with "--force" and rerun your deployment command.

Please file an issue at https://github.com/tessel/t2-cli/issues/new
INFO Writing project to RAM on Ramses (2468.864 kB)...
INFO Deployed.
INFO Running index.js...
module.js:339
    throw err;
    ^

Error: Cannot find module '/tmp/remote-script/node_modules/tessel/node_modules/usb/src/binding/usb_bindings.node'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/tmp/remote-script/node_modules/tessel/node_modules/usb/usb.js:1:452)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
johnnyman727 commented 8 years ago

@sanderblue we don't do a great job of documenting this but you don't need to (and shouldn't) 'npm install tessel' into your projects. That module is ready installed on Tessel 2 by default.

Unless you are trying to install the Tessel 1 CLI on your Tessel 2 so you can control your Tessels from your Tessel?

sanderblue commented 8 years ago

Well clears things up a bit. Thanks for the response. Confirmed this.

johnnyman727 commented 8 years ago

Sorry about that - I've created this issue as a potential way to avoid this in the future.