balthisar / cncjs-pendant-gamepad

Use a Videogame Controller as a CNCjs Pendant
MIT License
10 stars 6 forks source link

cncjs-pendant-gamepad.js will not run #6

Open TJ-Houghton opened 1 year ago

TJ-Houghton commented 1 year ago

Trying to install the gamepad pendant and when I get to these lines: git clone https://github.com/balthisar/cncjs-pendant-gamepad.git && cd cncjs-pendant-gamepad npm install

I get the following error:

Found 1 error in node_modules/@types/node/globals.d.ts:72

npm ERR! code 2 npm ERR! path /home/tj/cncjs-pendant-gamepad npm ERR! command failed npm ERR! command sh -c npm run build-ts && npm run copy-files

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2023-01-08T20_06_35_495Z-debug-0.log

Any suggestions? I am on an RPi 4. I already completed CNCjs installation and upgraded nodeJS to version 16

The complete log file is here: 2023-01-08T20_05_44_966Z-debug-0.log

neilhand commented 1 year ago

I was struggling with this until i installed the 4.8.4 version of type script rather than the default. It appears that the default 4.9 branch does not work.

npm install -g typescript@4.8.4

TJ-Houghton commented 1 year ago

@neilhand, Thanks! That worked.

TJ-Houghton commented 1 year ago

@neilhand, I spoke too soon. The installation ran without any errors, but I still get an error when I run cncjs-pendant-gamepad. It says command not found, but I am running it from the folder that has the file, and I checked to make sure the file exists

neilhand commented 1 year ago

@TJ-Houghton

What's the command line and error?

Make sure that you /dev/input/js0 is there before starting.

I forget all the issues i had getting it to run - but i did get there so maybe the error messages would trigger a memory. Even managed to get things configured, which involved not only the config files but some javascript changes to manage the way sixad presented my PS3 gamepad - main issue was related to the Hat representing a 4 half analog axis vs two full axis.

For reference - i'm running on a RPI4, with a dualshock connected by bluetooth, and i needed to use the "sixad" application to interface with the joystick rather than the bluetooth control.