convert-units
convert-units copied to clipboard
Unable to resolve type definitions
Hello, this project seems to solve our needs at work. But I can't make this running properly.
I'm trying to run the following typescript code
import configureMeasurements from 'convert-units';
import allMeasures from 'convert-units/definitions/all';
const convert = configureMeasurements(allMeasures);
but what I get from my ide is : Unable to resolve path to module "convert-units/definitions/all".
I also tried the @beta
and to install type definitions from @types/convert-units
but nothing seems to work so far.
@Rawnly I'm using beta. Try this. Works for me:
import configureMeasurements, { allMeasures } from "convert-units";
I was able to solve it using beta version
import configureMeasurements from 'convert-units'
import mass from 'convert-units/definitions/mass'
const convert = configureMeasurements({ mass })
The imports were fixed with the most resent beta version.