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.

Could not find a declaration file for module '@aws-amplify/ui'

See original GitHub issue

Describe the bug When trying to build a typescript project I’m getting: Could not find a declaration file for module ‘@aws-amplify/ui:

node_modules/aws-amplify/lib/index.d.ts:8:16 - error TS7016: Could not find a declaration file for module '@aws-amplify/ui'. '/Users/samuelcastro/Projects/Control4/react-sdk/node_modules/@aws-amplify/ui/dist/aws-amplify-ui.js' implicitly has an 'any' type.
  Try `npm install @types/aws-amplify__ui` if it exists or add a new declaration (.d.ts) file containing `declare module '@aws-amplify/ui';`

8 import UI from '@aws-amplify/ui';

To Reproduce Steps to reproduce the behavior:

  1. In a typescript (3.1.2) project run: ./node_modules/.bin/tsc
  2. See error

Expected behavior Successfully build

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:21
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

11reactions
pl4yradamcommented, May 25, 2019

This should not be marked as a feature request, it completely breaks compiling

8reactions
rjjlucycommented, Oct 9, 2019

I added "noImplicitAny": false, in my tsconfig.json and seems like the error is gone.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use AWS Amplify in React Native with Typescript ...
To suppress the TypeScript warning, you need to define your own TS declaration file (*.d.ts). To get approximate typings, you can copy this ......
Read more >
AWS Amplify TypeScript aws-exports.js - Duncan Leung
Importing aws-exports.js with TypeScript Error I was running into an issue using the AWS ... Could not find a declaration file for module...
Read more >
Could not find declaration file for module 'react' | bobbyhadz
The error "could not find declaration file for module 'react'" occurs when TypeScript cannot find the type declaration for a react-related module.
Read more >
Error: Could not find a declaration file for module - YouTube
Fix error: Could not find a declaration file for module ... implicitly has an 'any' type.Try npm install library-name if it exists or...
Read more >
Tutorial - Set up fullstack project - Angular - AWS Amplify Docs
Getting Started with Amplify - Setup a fullstack project - Angular - AWS Amplify Docs. ... Could not find a declaration file for...
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