I need to use npm edit-distance package in a Botkit bot that I’m developing, but I don’t know how to do that in Glitch, is it possible? If not, what I have to do? Sorry, I’m a novice.
You can add it to package.json by editing the file, but the easiest way is to use the package search that you’ll see at the top of the window when you edit package.json.
Oh great! Thanks a lot Tim!
(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)
It looks like you have chosen a version of that library that doesn’t exist. If you go to Tools -> Logs in the lower left corner of the editor, you can see the error.
Hi @RomanDubrovsky, I think you’re running into an issue with the 3rd party service we use to help manage the package list that you see in that dropdown. If you take a look at https://hilarious-monarch.glitch.me/?name=node-vk-bot-api&version=2.5.0 you can see that version 2.5 has been unpublished from NPM, but libraries.io still shows that as the most recent version.
In these cases you’ll need to manage the version manually - you can find the current version in npm’s version tab for the package.
Sorry for the inconvenience!
Thank you very much for help
Could you give an example of the correct “package.json”?
It looks to me like you’ve got a proper version of that package specified now; are you still running into problems?
What should the “package.json” look like after that?