1
votes

I'm trying to get Algolia Search integrated with my Angular 2 app and as I've been following the install guide found here: https://github.com/algolia/algoliasearch-client-javascript#install, I'm finding that when I run typings install algoliasearch-client-javascript --save --global in my terminal, I get this error:

typings ERR! message Unable to find "algoliasearch-client-javascript" ("npm") in the registry.

I'm not entirely sure what I've done wrong, because I'm following the guide step by step. I know I'm using webpack, because I'm actually utilizing Ionic 2, which uses Webpack.

I checked my config.json and I have "algoliasearch": "^3.20.2", installed.

Any clues to what I'm doing wrong here?

1
I've never used typings, but the command you showed isn't exactly the one in the README: typings install dt~algoliasearch-client-javascript --save --globalJerska
Hm, even that one still gives me that same error :/ I did try typings install algoliasearch --save --global and it didn't give me an error but I still can't seem to use algoliasearch in my projectStevie Star
Use typings search command to find your approriate library to install. It doesn't 100% corrolate to your normal depedency. It might not exist at all, in which case write it yourself and submit it to typings. Also check @types/algoliasearch-client-js maybemisha130

1 Answers

4
votes

You can just import the typings via: npm install --save @types/algoliasearch

Now you can import the module via: import * as algoliasearch from 'algoliasearch' and it should work properly.

I tested it on a Ionic project, and had no issues.