You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using aws-amplify version 3.4.3 for authentication recently we upgraded the Angular application to version 17. For that Angular 17 it needs aws-amplify version to latest because we are facing graphql error while build the application.
Sow we updated to aws-amplify version to 4.3.46 after updating we are facing issue while running npm run test test .
Expected behavior
On aws-amplify version 3.4.3 all the test cases are passed without failing
Reproduction steps
Copy paste the above app.component.ts file in any angular application and run npm run test.
FAIL src/app/common/components/kiosk/kiosk-scan-qr/kiosk-scan-qr.component.spec.ts
● Test suite failed to run
Jest encountered an unexpected token
Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.
Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.
By default "node_modules" folder is ignored by transformers.
Here's what you can do:
• If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
• If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
• To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
• If you need a custom transformation specify a "transform" option in your config.
• If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
You'll find more details and examples of these config options in the docs:
https://jestjs.io/docs/configuration
For information about custom transformations, see:
https://jestjs.io/docs/code-transformation
Details:
C:\Users\gokulakrishnan.k\Angular App\events-kiosk\node_modules\@aws-sdk\client-lex-runtime-service\node_modules\uuid\dist\esm-browser\index.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){export { default as v1 } from './v1.js';
^^^^^^
SyntaxError: Unexpected token 'export'
3 | import { environment } from '../../environments/environment';
4 | import { BehaviorSubject, catchError, throwError } from 'rxjs';
> 5 | import { Auth } from 'aws-amplify';
| ^
6 |
7 |
8 | @Injectable({
at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14)
at Object.<anonymous> (node_modules/@aws-sdk/client-lex-runtime-service/node_modules/@aws-sdk/middleware-retry/dist-cjs/StandardRetryStrategy.js:6:16)
at Object.<anonymous> (node_modules/@aws-sdk/client-lex-runtime-service/node_modules/@aws-sdk/middleware-retry/dist-cjs/AdaptiveRetryStrategy.js:6:33)
at Object.<anonymous> (node_modules/@aws-sdk/client-lex-runtime-service/node_modules/@aws-sdk/middleware-retry/dist-cjs/index.js:4:22)
at Object.<anonymous> (node_modules/@aws-sdk/client-lex-runtime-service/dist-cjs/LexRuntimeServiceClient.js:9:28)
at Object.<anonymous> (node_modules/@aws-sdk/client-lex-runtime-service/dist-cjs/LexRuntimeService.js:9:35)
at Object.<anonymous> (node_modules/@aws-sdk/client-lex-runtime-service/dist-cjs/index.js:5:22)
at Object.<anonymous> (node_modules/@aws-amplify/interactions/src/Providers/AWSLexProvider.ts:20:1)
at Object.<anonymous> (node_modules/@aws-amplify/interactions/src/Providers/index.ts:13:1)
at Object.<anonymous> (node_modules/@aws-amplify/interactions/src/Interactions.ts:21:1)
at Object.<anonymous> (node_modules/@aws-amplify/interactions/src/index.ts:13:1)
at Object.<anonymous> (node_modules/aws-amplify/src/index.ts:45:1)
at Object.require (src/app/providers/bff.service.ts:5:1)
at Object.<anonymous> (src/app/common/components/kiosk/kiosk-scan-qr/kiosk-scan-qr.component.spec.ts:5:1)
aws-exports.js
not applicable
Manual configuration
not applicable
Additional configuration
not applicable
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
sdfds
The text was updated successfully, but these errors were encountered:
Hi @goku7995 thank you for opening this issue. I had a question to ask - it sounds like you are working to update to the latest version of aws-amplify however you specifically mention v4.3.46. To be clear, the latest major version of aws-amplify is v6.x.x - have you tried upgrading to this instead?
Hi 👋 Closing this issue as we have not heard back from you. If you are still experiencing this, please feel free to reply back and provide any information previously requested and we'd be happy to re-open the issue.
Before opening, please confirm:
JavaScript Framework
Angular
Amplify APIs
Authentication
Amplify Version
4.3.46
Amplify Categories
auth
Backend
Amplify CLI
Environment information
Describe the bug
We are using aws-amplify version 3.4.3 for authentication recently we upgraded the Angular application to version 17. For that Angular 17 it needs aws-amplify version to latest because we are facing graphql error while build the application.
Sow we updated to aws-amplify version to 4.3.46 after updating we are facing issue while running npm run test test .
Expected behavior
On aws-amplify version 3.4.3 all the test cases are passed without failing
Reproduction steps
Copy paste the above app.component.ts file in any angular application and run npm run test.
Code Snippet
Log output
aws-exports.js
not applicable
Manual configuration
not applicable
Additional configuration
not applicable
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
sdfds
The text was updated successfully, but these errors were encountered: