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

platform-core import issue when running app #2235

Closed
jtweeks opened this issue Nov 15, 2024 · 9 comments
Closed

platform-core import issue when running app #2235

jtweeks opened this issue Nov 15, 2024 · 9 comments
Labels
pending-community-response Issue is pending a response from the author or community pending-triage Incoming issues that need categorization sandbox Related to the sandbox experience

Comments

@jtweeks
Copy link

jtweeks commented Nov 15, 2024

Environment information

System:
  OS: macOS 14.5
  CPU: (8) x64 Intel(R) Core(TM) i7-8557U CPU @ 1.70GHz
  Memory: 197.95 MB / 8.00 GB
  Shell: /bin/zsh
Binaries:
  Node: 18.19.1 - ~/.nvm/versions/node/v18.19.1/bin/node
  Yarn: undefined - undefined
  npm: 10.8.3 - ~/.nvm/versions/node/v18.19.1/bin/npm
  pnpm: undefined - undefined
NPM Packages:
  @aws-amplify/auth-construct: 1.5.0
  @aws-amplify/backend: 1.7.0
  @aws-amplify/backend-auth: 1.4.0
  @aws-amplify/backend-cli: 1.4.2
  @aws-amplify/backend-data: 1.2.0
  @aws-amplify/backend-function: 1.7.5
  @aws-amplify/backend-output-schemas: 1.4.0
  @aws-amplify/backend-output-storage: 1.1.3
  @aws-amplify/backend-secret: 1.1.5
  @aws-amplify/backend-storage: 1.2.2
  @aws-amplify/cli-core: 1.2.0
  @aws-amplify/client-config: 1.5.2
  @aws-amplify/deployed-backend-client: 1.4.2
  @aws-amplify/form-generator: 1.0.3
  @aws-amplify/model-generator: 1.0.9
  @aws-amplify/platform-core: 1.2.0
  @aws-amplify/plugin-types: 1.4.0
  @aws-amplify/sandbox: 1.2.5
  @aws-amplify/schema-generator: 1.2.5
  aws-amplify: 6.8.2
  aws-cdk: 2.166.0
  aws-cdk-lib: 2.167.0
  typescript: 5.0.4
AWS environment variables:
  AWS_STS_REGIONAL_ENDPOINTS = regional
  AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
  AWS_SDK_LOAD_CONFIG = 1
No CDK environment variables

Describe the bug

Error: node_modules/@aws-amplify/platform-core/lib/package_json_reader.d.ts:1:8 - error TS1192: Module '"/Users/joseweeks/Documents/WebApps/villadelsol/node_modules/zod/index"' has no default export.

import z from 'zod';

Reproduction steps

I do have my front end and backend as separate projects and git repos.
Did an angular 'npm run start' in local dev environment

Can be fixed by updating import to: import type * as z from 'zod';
in package_json_reader.d.ts

@jtweeks jtweeks added the pending-triage Incoming issues that need categorization label Nov 15, 2024
@ykethan
Copy link
Member

ykethan commented Nov 15, 2024

Hey @jtweeks, thank you for reaching out. To reproduce this issue could you provide us some additional information.
Are you experiencing this issue when using the Data client in your application?

@ykethan ykethan added sandbox Related to the sandbox experience pending-response Issue is pending response from author labels Nov 15, 2024
@jtweeks
Copy link
Author

jtweeks commented Nov 15, 2024 via email

@github-actions github-actions bot removed the pending-response Issue is pending response from author label Nov 15, 2024
@jtweeks
Copy link
Author

jtweeks commented Nov 15, 2024 via email

@ykethan
Copy link
Member

ykethan commented Nov 19, 2024

Hey @jtweeks, apologies on the delay. I was not able to reproduce this issue, could you provide us a minimal reproduction steps or link to a Github repo that would help us in diving into this issue.

@ykethan ykethan added the pending-response Issue is pending response from author label Nov 19, 2024
@Jay2113 Jay2113 added pending-community-response Issue is pending a response from the author or community and removed pending-response Issue is pending response from author labels Nov 19, 2024
@jtweeks
Copy link
Author

jtweeks commented Nov 19, 2024

I believe this issue stems from using 2 different projects, with different typescript versions. My front end is using Angular 16 and typescript 5.0.? the backend project is using 5.6.? and amplify 6.8.?. All I did was point to the schema in the backend project from the front end, and the issue happens when it tries to resolve all the dependencies. Do I have to use a schema with the client? Can I use other clients, and will they authenticate? thanks

@jtweeks
Copy link
Author

jtweeks commented Nov 23, 2024 via email

@ykethan
Copy link
Member

ykethan commented Nov 27, 2024

Hey @jtweeks, apologies on the delay. having a bit of trouble reproducing this issue with the information provided. Would you be open to sharing your project with a minimal reproduction or via a DM on discord? my handle is ykethan

@ykethan ykethan added the pending-response Issue is pending response from author label Nov 27, 2024
@jtweeks
Copy link
Author

jtweeks commented Dec 2, 2024 via email

@github-actions github-actions bot removed the pending-response Issue is pending response from author label Dec 2, 2024
@ykethan
Copy link
Member

ykethan commented Dec 5, 2024

Glad to hear you were able to get this working.
Closing this issue, do reach out on a new issue if you require any additional assistance.

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-community-response Issue is pending a response from the author or community pending-triage Incoming issues that need categorization sandbox Related to the sandbox experience
Projects
None yet
Development

No branches or pull requests

3 participants