Closed yukitaka13-1110 closed 2 years ago
@yukitaka13-1110 Can you upgrade to the latest versions of aws-amplify-vue
and @aws-amplify/ui
. Prior to upgrading, please delete your node_modules along with a lock file (e.g. package-lock.json
or yarn.lock
) and see if you're still experiencing this issue.
Thank you for quick response. I tried this way.
$ npm uninstall aws-amplify-vue --save
$
I could resolve about @aws-amplify, but I still get this error in aws-amplify-vue.
ERROR in /mypath/src/main.ts
9:31 Could not find a declaration file for module 'aws-amplify-vue'.
'/mypath/node_modules/aws-amplify-vue/dist/aws-amplify-vue.common.js'
implicitly has an 'any' type.
Try `npm install @types/aws-amplify-vue`
if it exists or add a new declaration (.d.ts) file containing `declare module 'aws-amplify-vue';`
7 |
8 | import Amplify, * as AmplifyModules from 'aws-amplify'
> 9 | import { AmplifyPlugin } from 'aws-amplify-vue'
| ^
10 | import awsexports from './aws-exports'
11 |
12 | Vue.config.productionTip = false
Dose types folder exist in aws-amplify-vue ?
@yukitaka13-1110 Apologize for not explaining it further but really the steps below would be how I (myself) would go about upgrading when using yarn.
This removes any node module issues that may still be living in the lock file.
rm -rf node_modules yarn.lock
Installing dependencies will, which in turn adds the latest versions.
yarn
However, to your point, we don't currently have typing available in our Vue library. I am going to mark this as a feature request since this isnt something we have added yet.
+1 to typing definitions.
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server amplify-help
forum.
Vue.js + TypeScript + AWS Amplify, I encountered the following error. Could not find types file. Is this error default behavior ? Is there a way to avoid this error?
tsconfig.json
package.json
Information
Vue.js => 3.8.2 TypeScript => 3.4.5