Skip to content

Typescript definitions are not found #196

@RashiqAzhan

Description

@RashiqAzhan

I'm receiving this error. It seems I can't import the types.

 error TS7016: Could not find a declaration file for module '@mathigon/fermat'

I installed using npm install @mathigon/fermat and tried to use the gcd like in the docs.

package.json

{
  "type": "module",
  "dependencies": {
    "@mathigon/fermat": "^1.1.23",
    "@types/node": "^22.10.1",
    "tsx": "^4.19.2"
  }
}

Using node version v23.2.0.

tsconfig.json

{
  "compilerOptions": {
    "target": "ESNext",                        
    "lib": ["ESNext"],                         
    "moduleDetection": "auto",      
    "module": "NodeNext",                      
    "moduleResolution": "NodeNext",            
    "typeRoots": ["node_modules/@types"],      
    "allowImportingTsExtensions": true,     
    "allowJs": true,                           
    "checkJs": true,                           
    "noEmit": true,                            
    "esModuleInterop": true,                   
    "forceConsistentCasingInFileNames": true,  
    "strict": true,                            
    "skipLibCheck": true,                      
  },
  "exclude": [
    "node_modules"
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions