Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find a declaration file for module 'ethjs' #39

Closed
pedrouid opened this issue Jul 17, 2019 · 2 comments
Closed

Could not find a declaration file for module 'ethjs' #39

pedrouid opened this issue Jul 17, 2019 · 2 comments

Comments

@pedrouid
Copy link

Failed to compile because I got the following error message:
Could not find a declaration file for module 'ethjs'

I tried to install @types/ethjs but wasn't successful

I managed to work around it by adding an empty declaration to the root directory index.d.ts
declare module "ethjs";

But then I ended getting a different error that I couldn't fix:
Cannot use namespace 'IProvider' as a type.

@pedrouid
Copy link
Author

The Typescript environment is generated using:
create-react-app APP_NAME --scripts-version=react-scripts-ts

Used the following tsconfig.json:

{
  "compilerOptions": {
    "baseUrl": ".",
    "outDir": "build/dist",
    "module": "esnext",
    "target": "es5",
    "lib": ["esnext", "es7", "dom"],
    "sourceMap": true,
    "allowJs": true,
    "jsx": "react",
    "moduleResolution": "node",
    "rootDir": "src",
    "forceConsistentCasingInFileNames": true,
    "noImplicitReturns": true,
    "noImplicitThis": true,
    "noImplicitAny": true,
    "importHelpers": true,
    "strictNullChecks": true,
    "suppressImplicitAnyIndexErrors": true,
    "allowSyntheticDefaultImports": true,
    "noUnusedLocals": true,
    "resolveJsonModule": true
  },
  "exclude": [
    "node_modules",
    "build",
    "scripts",
    "acceptance-tests",
    "webpack",
    "jest",
    "src/setupTests.ts"
  ]
}

@stanislaw-glogowski
Copy link
Contributor

Please try to use our missing typescript definition npm:
https://github.com/netgum/netgum-types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants