Skip to content
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

How do I run this code? #74

Open
maurus56 opened this issue Jan 24, 2018 · 3 comments
Open

How do I run this code? #74

maurus56 opened this issue Jan 24, 2018 · 3 comments

Comments

@maurus56
Copy link

sorry about the stupid question but i tried with the "dualshock-controller" in the terminal thinking it was a standalone and also with "node dualshock-controller" and got this

maurolanzas-MBP:~ maurolanza$ node dualshock-controller
module.js:557
    throw err;
    ^

Error: Cannot find module '/Users/maurolanza/dualshock-controller'
    at Function.Module._resolveFilename (module.js:555:15)
    at Function.Module._load (module.js:482:25)
    at Function.Module.runMain (module.js:701:10)
    at startup (bootstrap_node.js:193:16)
    at bootstrap_node.js:617:3

and during instalation:

maurolanzas-MBP:~ maurolanza$ npm install dualshock-controller

> [email protected] install /Users/maurolanza/node_modules/node-hid
> prebuild-install || node-gyp rebuild

prebuild-install info begin Prebuild-install version 2.5.0
prebuild-install info looking for local prebuild @ prebuilds/node-hid-v0.5.7-node-v59-darwin-x64.tar.gz
prebuild-install info looking for cached prebuild @ /Users/maurolanza/.npm/_prebuilds/https-github.com-node-hid-node-hid-releases-download-v0.5.7-node-hid-v0.5.7-node-v59-darwin-x64.tar.gz
prebuild-install http request GET https://github.com/node-hid/node-hid/releases/download/v0.5.7/node-hid-v0.5.7-node-v59-darwin-x64.tar.gz
prebuild-install http 404 https://github.com/node-hid/node-hid/releases/download/v0.5.7/node-hid-v0.5.7-node-v59-darwin-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=9.4.0 runtime=node arch=x64 platform=darwin)
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

  CC(target) Release/obj.target/hidapi/hidapi/mac/hid.o
../hidapi/mac/hid.c:252:20: warning: comparison of integers of different signs: 'CFIndex' (aka 'long') and 'size_t' (aka 'unsigned long')
      [-Wsign-compare]
                if (chars_copied == len)
                    ~~~~~~~~~~~~ ^  ~~~
1 warning generated.
  LIBTOOL-STATIC Release/hidapi.a
  CXX(target) Release/obj.target/HID/src/HID.o
../src/HID.cc:207:45: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
    Local<Object> buf = nodeBufConstructor->NewInstance(1, nodeBufferArgs);
                                            ^
/Users/maurolanza/.node-gyp/9.4.0/include/node/v8.h:3843:3: note: 'NewInstance' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/maurolanza/.node-gyp/9.4.0/include/node/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
1 warning generated.
  SOLINK_MODULE(target) Release/HID.node
npm WARN saveError ENOENT: no such file or directory, open '/Users/maurolanza/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/Users/maurolanza/package.json'
npm WARN maurolanza No description
npm WARN maurolanza No repository field.
npm WARN maurolanza No README data
npm WARN maurolanza No license field.

+ [email protected]
added 56 packages in 84.514s

Is there any problem with that?

@tobiasmuecksch
Copy link

By looking at your error stack, I have to assume you are running this on Mac. Do you have Xcode installed?

@idiotWu
Copy link

idiotWu commented Jul 1, 2018

Ran into same issue here with node.js v10.0.0 and Xcode 9.4.1 installed. Problem got solved when I switched to node.js v8.5.0 🤔.

@itaisteinherz
Copy link
Contributor

What are you trying to do exactly?
Running node dualshock-controller doesn't work because the command tells Node.js to run a file named dualshock-controller located in the current working directory, which in this case doesn't exist. To get started with some examples, check out the examples directory or ds-examples (if you're using a DualShock 4).

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

4 participants