-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Application is not compiling due to the typing #13050
Comments
Hello, @julien-bitaillou and thanks for opening this issue. Since you've recently upgraded from v5 to v6, can you see if taking the following steps helps resolve the type errors you're experiencing?
If the type errors persist after taking the above steps, then let me know and we'll dig deeper! |
Hello @cwomack, the type error persist after deleting the |
In order for us to be able to help, can you please share some more details about the type errors you're seeing? If you have the error messages, logs, reproduction steps, code snippets, etc please share them as well. |
We have the following logs:
|
It appears that you're not excluding node_modules from the TypeScript compiler. In "compilerOptions": {
...
"exclude": [
"./node_modules/**/*",
],
}
... |
We still have errors with the exclude option |
Can you share your code? We're using v6 with TypeScript and we're not seeing this. It definitely looks to me from the logs you shared that the compiler is trying to compile library code. |
The errors are the same, according to typescript documentation, |
Do you have anything set for |
Hi @julien-bitaillou adding to what @rcoundon asked above, it would also be helpful if you can share your |
@julien-bitaillou if you're still experiencing this issue, can you provide you |
Hello everyone, thanks for looking into this, tsconfig.base.json{ "compileOnSave": false, "angularCompilerOptions": { "strictTemplates": true }, "compilerOptions": { "rootDir": ".", "sourceMap": true, "declaration": false, "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, "resolveJsonModule": true, "importHelpers": true, "target": "ES2020", "module": "esnext", "lib": ["ES2021", "ES2019", "ES2018", "ES2017", "ES2016", "ES2015", "dom"], "types": ["node", "jest"], "skipLibCheck": true, "skipDefaultLibCheck": true, "esModuleInterop": true, "paths": { "@angular/*": ["../../node_modules/@angular/*"], ... } }, "watchOptions": { "excludeDirectories": ["**/node_modules"] }, "exclude": ["./node_modules/**/*", "tmp/**/*", "setEnv.ts"] } app tsconfig.json{ "extends": "../../tsconfig.base.json", "compilerOptions": { "baseUrl": "./", "outDir": "./out-tsc/app", "types": [], "target": "ES2022", "useDefineForClassFields": false }, "files": ["src/main.ts", "src/polyfills.ts"], "include": ["src/**/*.d.ts"] } package.json{ "name": "front-end", "version": "0.0.0", "license": "MIT", "scripts": { "ng": "nx", "postinstall": "npm run environments && node ./decorate-angular-cli.js", "start": "nx serve", "build": "nx build", "test": "nx test", "environments": "ts-node tools/setEnv.ts", "prettier": "npx prettier apps/**/src --write", "e2e": "ng e2e" }, "private": true, "devDependencies": { "@angular/core": "17.2.4", "@nrwl/angular": "18.1.2", "@types/node": "^18.16.9", "rxjs": "7.4.0", "typescript": "5.3.3", ... }, "dependencies": { "aws-amplify": "6.0.26", ... }, "engines": { "node": ">=18", "npm": ">=10" } } and here is how I import and use the function in my code: import { signInWithRedirect } from 'aws-amplify/auth';
...
await signInWithRedirect({ provider: { custom: environment.SSO_IDP_NAME } }); I have recently upgraded from v5 to v6, tried to delete |
I also get a build error starting with release v6.0.17:
I work with a legacy project which doesn't use the TS strict settings. |
Okay, my bad. I had a deeper look and found that I was accidentally importing a type from the src folder. |
@ralphkurche, glad to hear you're unblocked! @atinary-ndefago, thanks for providing dependencies. Are you getting the same errors reported by OP or a different type error? |
It was the same error, adding |
Okay, my bad, I was also importing stuff from |
@julien-bitaillou, are you still experiencing this? |
Can confirm this fixes all of the import errors. I was facing errors similar to #13050 (comment). Thanks atinary-ndefago |
@mohammedsahl, thank you for the confirmation! Closing this issue for now after getting a few comments stating this can be resolved. |
Before opening, please confirm:
JavaScript Framework
Angular
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
None
Environment information
Describe the bug
Application is not compiling due to the typing
Expected behavior
Application to compile
Reproduction steps
after migration from v5 to v6
Code Snippet
// Put your code below this line.
Log output
aws-exports.js
No response
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
No response
The text was updated successfully, but these errors were encountered: