question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use with typescript

See original GitHub issue

Hello Thank you for this great lib I can not manage to use it in silex.me which is in typescript too Here is what i do

$ npm install --save-dev detect.js 

Then in the code

import { detect } from 'detect-browser';

And the result is TS2307: Cannot find module 'detect-browser'.

I also tried installing the github repo with npm install --save-dev DamonOehlman/detect-browser

Here is another try:

ls -l node_modules/detect-browser
total 80K
drwxrwxr-x.   2 lexoyo lexoyo 4.0K May 31 17:25 .
drwxrwxr-x. 760 lexoyo lexoyo  24K May 31 17:29 ..
-rw-rw-r--.   1 lexoyo lexoyo 1.9K Oct 26  1985 index.d.ts
-rw-rw-r--.   1 lexoyo lexoyo 5.7K Oct 26  1985 index.js
-rw-rw-r--.   1 lexoyo lexoyo 1.1K Oct 26  1985 LICENSE
-rw-rw-r--.   1 lexoyo lexoyo 2.1K May 31 17:25 package.json
-rw-rw-r--.   1 lexoyo lexoyo 4.3K Oct 26  1985 README.md
-rw-rw-r--.   1 lexoyo lexoyo  19K Oct 26  1985 yarn.lock

Thank you in advance for any help

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lexoyocommented, Jul 8, 2019

I didn’t upgrade yet I will eventually Maybe we should close this issue and I’ll reopen it if doesn’t work

0reactions
DamonOehlmancommented, Jul 8, 2019

@lexoyo Just wondering if you had any success with 4.5.1 - looking to close this issue if you did.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - TypeScript for JavaScript Programmers
TypeScript knows the JavaScript language and will generate types for you in many cases. For example in creating a variable and assigning it...
Read more >
What is TypeScript and why should you use it? - Contentful
TypeScript extends JavaScript and improves the developer experience. It enables developers to add type safety to their projects. Moreover, ...
Read more >
How to Use TypeScript – Beginner-Friendly TS Tutorial
TypeScript is a superset of JavaScript. Superset means that it adds features on top of what JavaScript offers. TypeScript takes all the ...
Read more >
Node.js with TypeScript
TypeScript is a trendy open-source language maintained and developed by Microsoft. It's loved and used by a lot of software developers around the...
Read more >
Why You Should Use Typescript for Your Next Project
TypeScript is a superset of typed JavaScript (optional) that can help build and manage large-scale JavaScript projects. It can be considered ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found