Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

130
Views
Problems using a js module is ts project

I have a react ts project where I installed a pure js module: crypto-prices. Considering this module doesn't have any @types source, I created a decs.d.ts file with:

declare module "crypto-prices"

This removes the IDE issue. Yet, when I try to use the cryptoPrice modules through

import cryptoPrice from 'crypto-prices'

I get the following error:

Can't resolve 'crypto-prices' in ...
about 4 years ago · Santiago Gelvez
2 answers
Answer question

0

Import it like this,

import * as cryptoPrice from 'crypto-prices'
about 4 years ago · Santiago Gelvez Report

0

You need to include decs.d.ts in tsconfig.json. If decs.d.ts is in the same folder as tsconfig.json it should look something like below:

tsconfig.json

{
    "include": [
        "./src/**/*",
        "./decs.d.ts"
    ],
    "compilerOptions": {
        ...
    }
}
about 4 years ago · Santiago Gelvez Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!