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

Package broken? #7

Closed
JonAndAnderson opened this issue Nov 5, 2020 · 2 comments
Closed

Package broken? #7

JonAndAnderson opened this issue Nov 5, 2020 · 2 comments

Comments

@JonAndAnderson
Copy link

Hi,

I installed this package hoping it would be relatively straight forward but it seems to be broken? I go to install the package and I get hit with a plethora of errors. I go to use as guided, I can't get anything to run because
"Could not find a declaration file for module 'stepper-wiringpi'. '/home/pi/Documents/TwitchArt/node_modules/stepper-wiringpi/src/stepper-wiringpi.js' implicitly has an 'any' type.
Try npm install @types/stepper-wiringpi if it exists or add a new declaration (.d.ts) file containing `declare module 'stepper-wiringpi';""

Anyone have any ideas on what I can do?

@mbush92
Copy link

mbush92 commented Nov 5, 2020

Are you using typescript in your project, that is what that error is referencing? In the tsconfig by default the noImplicitAny is set to true which causes an error when an implicit any is found. I found this article that explains what is happening and how to resolve it. https://www.detroitlabs.com/blog/2018/02/28/adding-custom-type-definitions-to-a-third-party-library/

@JonAndAnderson
Copy link
Author

Yea I was having a few issues. I didn't need TypeScript in the project. The error I was having for this library I never figured out but I used this library which worked for me instead: https://github.com/jcane86/motor-hat

I didn't understand that a TypeScript library does not need TypeScript installed to use. Plus the stepper motor I am using is hooked up to an adafruit stepper hat for the pi which the library above directly helps. I appreciate the response but I went in a different direction I guess. Thank you!

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

2 participants