aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.43k stars 2.13k forks source link

TS2305: Module '"type-fest"' has no exported member 'PartialDeep'. #10032

Closed groths89 closed 2 years ago

groths89 commented 2 years ago

Before opening, please confirm:

JavaScript Framework

Angular

Amplify APIs

GraphQL API, DataStore

Amplify Categories

auth, storage, function, api, hosting

Environment information

``` System: OS: Windows 10 10.0.19044 CPU: (4) x64 Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz Memory: 9.17 GB / 23.96 GB Binaries: Node: 14.17.2 - C:\Program Files\nodejs\node.EXE npm: 6.11.3 - C:\Program Files\nodejs\npm.CMD Browsers: Chrome: 103.0.5060.53 Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.37) Internet Explorer: 11.0.19041.1566 npmPackages: @angular-architects/module-federation: ^14.2.2 => 14.3.8 @angular-devkit/build-angular: ^13.3.0 => 13.3.8 @angular/animations: ^13.3.0 => 13.3.11 @angular/cdk: ^13.3.1 => 13.3.9 @angular/cli: ^13.3.0 => 13.3.8 @angular/common: ^13.3.0 => 13.3.11 @angular/compiler: ^13.3.0 => 13.3.11 @angular/compiler-cli: ^13.3.0 => 13.3.11 @angular/core: ^13.3.0 => 13.3.11 @angular/elements: ^13.3.0 => 13.3.11 @angular/forms: ^13.3.0 => 13.3.11 @angular/google-maps: ^12.2.6 => 12.2.13 @angular/material: ^13.3.1 => 13.3.9 @angular/platform-browser: ^13.3.0 => 13.3.11 @angular/platform-browser-dynamic: ^13.3.0 => 13.3.11 @angular/router: ^13.3.0 => 13.3.11 @aws-amplify/api-graphql: ^2.3.8 => 2.3.8 @aws-amplify/datastore: ^3.12.1 => 3.12.1 @aws-amplify/ui-angular: ^2.4.12 => 2.4.12 @babel/core: 7.0.0-beta.47 => 7.0.0-beta.47 @emailjs/browser: ^3.6.2 => 3.6.2 @fortawesome/angular-fontawesome: ^0.10.0 => 0.10.2 @fortawesome/fontawesome-svg-core: ^1.2.36 => 1.2.36 @fortawesome/free-brands-svg-icons: ^5.15.4 => 5.15.4 @fortawesome/free-regular-svg-icons: ^5.15.4 => 5.15.4 @fortawesome/free-solid-svg-icons: ^5.15.4 => 5.15.4 @sendgrid/mail: ^7.6.2 => 7.7.0 @types/graphql: ^14.5.0 => 14.5.0 @types/jasmine: ~3.6.0 => 3.6.11 @types/jest: ^27.4.1 => 27.5.2 @types/node: ^12.11.1 => 12.20.55 aws-amplify: ^4.3.26 => 4.3.26 aws-lambda: ^1.0.7 => 1.0.7 cypress: ^6.3.0 => 6.9.1 hammerjs: ^2.0.8 => 2.0.8 history: ^5.3.0 => 5.3.0 ini: ^1.3.5 => 1.3.8 inquirer: ^6.5.1 => 6.5.2 jasmine: ^2.4.1 => 2.99.0 jasmine-core: 3.8 => 3.8.0 jasmine-reporters: ^2.5.0 => 2.5.0 jasmine-spec-reporter: ^7.0.0 => 7.0.0 karma: ~6.3.0 => 6.3.20 karma-chrome-launcher: ~3.1.0 => 3.1.1 karma-coverage: ~2.0.3 => 2.0.3 karma-jasmine: ~4.0.0 => 4.0.2 karma-jasmine-html-reporter: ^1.5.0 => 1.7.0 mocha: ^5.2.0 => 5.2.0 mochawesome: ^4.1.0 => 4.1.0 mochawesome-merge: ^4.2.1 => 4.2.1 mochawesome-report-generator: ^6.0.1 => 6.2.0 ng-video-player: ^1.1.6 => 1.1.6 ngx-build-plus: ^13.0.1 => 13.0.1 ngx-mask: ^13.1.3 => 13.1.15 pm2: ^5.1.2 => 5.2.0 protractor: ^7.0.0 => 7.0.0 protractor-html-reporter-2: ^1.0.4 => 1.0.4 protractor-pretty-html-reporter: 0.0.16 => 0.0.16 react: 16.4.1 => 16.4.1 react-native: 0.56 => 0.56.1 rxjs: ^6.6.7 => 6.6.7 start-server-and-test: ^1.14.0 => 1.14.0 tslib: ^1.10.0 => 1.14.1 typescript: 4.4.2 => 4.4.2 wait-on: ^6.0.0 => 6.0.1 zen-observable-ts: ^1.1.0 => 1.1.0 zone.js: ~0.11.4 => 0.11.6 npmGlobalPackages: @angular/cli: 12.2.16 @aws-amplify/cli: 8.0.1 appium-doctor: 1.13.1 appium: 1.16.0 copyfiles: 2.4.1 eslint: 8.12.0 firebase-tools: 9.23.1 firebase: 5.10.0 foundation-cli: 2.3.0 gatsby-cli: 1.1.58 nodemon: 2.0.15 npm: 6.11.3 nx: 13.8.3 sass: 1.51.0 tools: 0.0.0 undo: 0.1.4 webpack: 4.13.0 ```

Describe the bug

When trying to compile my Angular application in development the build fails with the following error.

Error: node_modules/.pnpm/@aws-amplify+ui@3.12.0_aws-amplify@4.3.26/node_modules/@aws-amplify/ui/dist/types/theme/types.d.ts:1:10 - error TS2305: Module '"type-fest"' has no exported member 'PartialDeep'.

1 import { PartialDeep } from 'type-fest';
           ~~~~~~~~~~~

× Failed to compile.

I thought I had the correct packages installed but not sure now.

Expected behavior

Expected to be able to compile the application in development without an issue.

Reproduction steps

  1. Install the npm packages
  2. Run the ng serve
  3. Compile the project

Code Snippet

// Put your code below this line.

Log output

``` // Put your logs below this line ```

aws-exports.js

const awsmobile = { "aws_project_region": "us-east-1", "aws_appsync_graphqlEndpoint": "https://zd3zjfq2jvbbdgejjiqpbk7rdq.appsync-api.us-east-1.amazonaws.com/graphql", "aws_appsync_region": "us-east-1", "aws_appsync_authenticationType": "API_KEY", "aws_appsync_apiKey": "da2-g5wyggwkfnhzxh3afklleim4ue", "aws_cognito_identity_pool_id": "us-east-1:1e5c44ab-8d12-481b-9d82-4f8021863e7d", "aws_cognito_region": "us-east-1", "aws_user_pools_id": "us-east-1_tslWQwme0", "aws_user_pools_web_client_id": "1t9sss8e5g1in1pivmau3mhhg6", "oauth": {}, "aws_cognito_username_attributes": [ "EMAIL" ], "aws_cognito_social_providers": [], "aws_cognito_signup_attributes": [ "EMAIL" ], "aws_cognito_mfa_configuration": "OFF", "aws_cognito_mfa_types": [ "SMS" ], "aws_cognito_password_protection_settings": { "passwordPolicyMinLength": 8, "passwordPolicyCharacters": [] }, "aws_cognito_verification_mechanisms": [ "EMAIL" ], "aws_user_files_s3_bucket": "cgowebapp3fe76c1ef7bb489ab3b3f7998288392a165517-prod", "aws_user_files_s3_bucket_region": "us-east-1", "aws_content_delivery_bucket": "cgo-webapp-hosting-prod", "aws_content_delivery_bucket_region": "us-east-1", "aws_content_delivery_url": "https://d2nkn5j2o50ki8.cloudfront.net", "aws_cognito_login_mechanisms": [ "PREFERRED_USERNAME" ] };

export default awsmobile;

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

{ "name": "web-app", "version": "1.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "watch": "ng build --watch --configuration development", "test": "ng test", "e2e": "cypress open", "amplify-modelgen": "node amplify\scripts\amplify-modelgen.js", "amplify-push": "node amplify\scripts\amplify-push.js", "run:all": "node node_modules/@angular-architects/module-federation/src/server/mf-dev-server.js" }, "browser": { "crypto": false }, "private": true, "dependencies": { "@angular-architects/module-federation": "^14.2.2", "@angular/animations": "^13.3.0", "@angular/cdk": "^13.3.1", "@angular/common": "^13.3.0", "@angular/compiler": "^13.3.0", "@angular/core": "^13.3.0", "@angular/elements": "^13.3.0", "@angular/forms": "^13.3.0", "@angular/google-maps": "^12.2.6", "@angular/material": "^13.3.1", "@angular/platform-browser": "^13.3.0", "@angular/platform-browser-dynamic": "^13.3.0", "@angular/router": "^13.3.0", "@aws-amplify/api-graphql": "^2.3.8", "@aws-amplify/datastore": "^3.12.1", "@aws-amplify/ui-angular": "^2.4.12", "@babel/core": "7.0.0-beta.47", "@emailjs/browser": "^3.6.2", "@fortawesome/angular-fontawesome": "^0.10.0", "@fortawesome/fontawesome-svg-core": "^1.2.36", "@fortawesome/free-brands-svg-icons": "^5.15.4", "@fortawesome/free-regular-svg-icons": "^5.15.4", "@fortawesome/free-solid-svg-icons": "^5.15.4", "@sendgrid/mail": "^7.6.2", "aws-amplify": "^4.3.26", "aws-lambda": "^1.0.7", "hammerjs": "^2.0.8", "history": "^5.3.0", "jasmine": "^2.4.1", "mochawesome-merge": "^4.2.1", "mochawesome-report-generator": "^6.0.1", "ng-video-player": "^1.1.6", "ngx-build-plus": "^13.0.1", "ngx-mask": "^13.1.3", "pm2": "^5.1.2", "react": "16.4.1", "react-native": "0.56", "rxjs": "^6.6.7", "tslib": "^1.10.0", "typescript": "4.4.2", "wait-on": "^6.0.0", "zen-observable-ts": "^1.1.0", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "^13.3.0", "@angular/cli": "^13.3.0", "@angular/compiler-cli": "^13.3.0", "@types/graphql": "^14.5.0", "@types/jasmine": "~3.6.0", "@types/jest": "^27.4.1", "@types/node": "^12.11.1", "cypress": "^6.3.0", "ini": "^1.3.5", "inquirer": "^6.5.1", "jasmine-core": "3.8", "jasmine-reporters": "^2.5.0", "jasmine-spec-reporter": "^7.0.0", "karma": "~6.3.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.0.3", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "^1.5.0", "mocha": "^5.2.0", "mochawesome": "^4.1.0", "protractor": "^7.0.0", "protractor-html-reporter-2": "^1.0.4", "protractor-pretty-html-reporter": "0.0.16", "start-server-and-test": "^1.14.0" } }

tannerabread commented 2 years ago

hi :wave: @groths89 I see you have some scoped packages installed separately from the main aws-amplify package, you shouldn't need both as aws-amplify will include datastore and graphql scoped packages. Are you still experiencing this issue?

groths89 commented 2 years ago

Ok thank you. That is probably causing my issue. I will need to update my packages to remove the added ones not needed.

tannerabread commented 2 years ago

@groths89 let me know if that doesn't solve your issue and I will look into it further

tannerabread commented 2 years ago

Hi 👋 Closing this as we have not heard back from you.

If you are still experiencing this issue and in need of assistance, please feel free to comment and provide us with any information previously requested by our team members so we can re-open this issue and be better able to assist you. If you believe this was an error with our documentation, please note here or open a new issue in the docs repo and we can fix the documentation.

Thank you!