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

create-react-app v 5, webpack 5, causes multiple warnings #703

Open
jacobgranberry opened this issue Feb 1, 2022 · 6 comments
Open

create-react-app v 5, webpack 5, causes multiple warnings #703

jacobgranberry opened this issue Feb 1, 2022 · 6 comments
Labels

Comments

@jacobgranberry
Copy link

Do you want to request a feature or report a bug?
Bug

What is the current behavior?

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Install CRA5 with aws-appsync

What is the expected behavior?
CRA5 should compile with no warnings

Which versions and which environment (browser, react-native, nodejs) / OS are affected by this issue? Did this work in previous versions?

Has anyone run into this issue or reconciled it somehow? Getting lots of warnings after upgrading react-scripts to version 5.0.0 which includes webpack 5. Everything compiles fine.

Versions:
"aws-appsync": "^4.1.4", "graphql": "^15.7.0",

Sample of the warnings thrown, all rooted in the aws-appsync dependency:

WARNING in ../../node_modules/apollo-cache-inmemory/lib/depTrackingCache.js
Module Warning (from ../../node_modules/react-scripts/node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/geeberry/Working/company-com-dashboard-nextgen/node_modules/apollo-cache-inmemory/src/depTrackingCache.ts' file: Error: ENOENT: no such file or directory, open '/home/geeberry/Working/company-com-dashboard-nextgen/node_modules/apollo-cache-inmemory/src/depTrackingCache.ts'
 @ ../../node_modules/apollo-cache-inmemory/lib/readFromStore.js 19:0-54 45:42-58 60:54-70
 @ ../../node_modules/apollo-cache-inmemory/lib/index.js 2:0-32 2:0-32
 @ ../../node_modules/aws-appsync/lib/client.js 213:30-62
 @ ../../node_modules/aws-appsync/lib/index.js 17:15-34 19:9-28
 @ ./src/services/secure-app-sync-client.js 8:0-40 55:2-15
 @ ./src/services/user/user-svc.ts 6:0-60 36:19-34 100:19-34 138:19-34 176:19-34 210:19-34 257:19-34 294:19-34 328:19-34 366:19-34 399:19-34 428:19-34 458:19-34 508:19-34 561:19-34 598:19-34 716:19-34 754:19-34 792:19-34 843:19-34 879:19-34 907:19-34 935:19-34 966:19-34 1023:19-34 1079:19-34 1108:19-34 1137:19-34 1225:19-34 1254:19-34 1290:19-34 1361:19-34 1441:19-34
 @ ./src/app.tsx 192:0-51 228:19-26
 @ ./src/index.tsx 19:0-24 156:43-46

WARNING in ../../node_modules/apollo-cache-inmemory/lib/fixPolyfills.js
Module Warning (from ../../node_modules/react-scripts/node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/geeberry/Working/company-com-dashboard-nextgen/node_modules/apollo-cache-inmemory/src/fixPolyfills.ts' file: Error: ENOENT: no such file or directory, open '/home/geeberry/Working/company-com-dashboard-nextgen/node_modules/apollo-cache-inmemory/src/fixPolyfills.ts'
 @ ../../node_modules/apollo-cache-inmemory/lib/inMemoryCache.js 43:0-24
 @ ../../node_modules/apollo-cache-inmemory/lib/index.js 1:0-73 1:0-73 1:0-73
 @ ../../node_modules/aws-appsync/lib/client.js 213:30-62
 @ ../../node_modules/aws-appsync/lib/index.js 17:15-34 19:9-28
 @ ./src/services/secure-app-sync-client.js 8:0-40 55:2-15
 @ ./src/services/user/user-svc.ts 6:0-60 36:19-34 100:19-34 138:19-34 176:19-34 210:19-34 257:19-34 294:19-34 328:19-34 366:19-34 399:19-34 428:19-34 458:19-34 508:19-34 561:19-34 598:19-34 716:19-34 754:19-34 792:19-34 843:19-34 879:19-34 907:19-34 935:19-34 966:19-34 1023:19-34 1079:19-34 1108:19-34 1137:19-34 1225:19-34 1254:19-34 1290:19-34 1361:19-34 1441:19-34
 @ ./src/app.tsx 192:0-51 228:19-26
 @ ./src/index.tsx 19:0-24 156:43-46

WARNING in ../../node_modules/apollo-cache-inmemory/lib/fragmentMatcher.js
Module Warning (from ../../node_modules/react-scripts/node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/geeberry/Working/company-com-dashboard-nextgen/node_modules/apollo-cache-inmemory/src/fragmentMatcher.ts' file: Error: ENOENT: no such file or directory, open '/home/geeberry/Working/company-com-dashboard-nextgen/node_modules/apollo-cache-inmemory/src/fragmentMatcher.ts'
 @ ../../node_modules/apollo-cache-inmemory/lib/index.js 4:0-34 4:0-34
 @ ../../node_modules/aws-appsync/lib/client.js 213:30-62
 @ ../../node_modules/aws-appsync/lib/index.js 17:15-34 19:9-28
 @ ./src/services/secure-app-sync-client.js 8:0-40 55:2-15
 @ ./src/services/user/user-svc.ts 6:0-60 36:19-34 100:19-34 138:19-34 176:19-34 210:19-34 257:19-34 294:19-34 328:19-34 366:19-34 399:19-34 428:19-34 458:19-34 508:19-34 561:19-34 598:19-34 716:19-34 754:19-34 792:19-34 843:19-34 879:19-34 907:19-34 935:19-34 966:19-34 1023:19-34 1079:19-34 1108:19-34 1137:19-34 1225:19-34 1254:19-34 1290:19-34 1361:19-34 1441:19-34
 @ ./src/app.tsx 192:0-51 228:19-26
 @ ./src/index.tsx 19:0-24 156:43-46

WARNING in ../../node_modules/apollo-cache-inmemory/lib/inMemoryCache.js
Module Warning (from ../../node_modules/react-scripts/node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/geeberry/Working/company-com-dashboard-nextgen/node_modules/apollo-cache-inmemory/src/inMemoryCache.ts' file: Error: ENOENT: no such file or directory, open '/home/geeberry/Working/company-com-dashboard-nextgen/node_modules/apollo-cache-inmemory/src/inMemoryCache.ts'
 @ ../../node_modules/apollo-cache-inmemory/lib/index.js 1:0-73 1:0-73 1:0-73
 @ ../../node_modules/aws-appsync/lib/client.js 213:30-62
 @ ../../node_modules/aws-appsync/lib/index.js 17:15-34 19:9-28
 @ ./src/services/secure-app-sync-client.js 8:0-40 55:2-15
 @ ./src/services/user/user-svc.ts 6:0-60 36:19-34 100:19-34 138:19-34 176:19-34 210:19-34 257:19-34 294:19-34 328:19-34 366:19-34 399:19-34 428:19-34 458:19-34 508:19-34 561:19-34 598:19-34 716:19-34 754:19-34 792:19-34 843:19-34 879:19-34 907:19-34 935:19-34 966:19-34 1023:19-34 1079:19-34 1108:19-34 1137:19-34 1225:19-34 1254:19-34 1290:19-34 1361:19-34 1441:19-34
 @ ./src/app.tsx 192:0-51 228:19-26
 @ ./src/index.tsx 19:0-24 156:43-46

WARNING in ../../node_modules/apollo-cache-inmemory/lib/index.js
Module Warning (from ../../node_modules/react-scripts/node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/geeberry/Working/company-com-dashboard-nextgen/node_modules/apollo-cache-inmemory/src/index.ts' file: Error: ENOENT: no such file or directory, open '/home/geeberry/Working/company-com-dashboard-nextgen/node_modules/apollo-cache-inmemory/src/index.ts'
 @ ../../node_modules/aws-appsync/lib/client.js 213:30-62
 @ ../../node_modules/aws-appsync/lib/index.js 17:15-34 19:9-28
 @ ./src/services/secure-app-sync-client.js 8:0-40 55:2-15
 @ ./src/services/user/user-svc.ts 6:0-60 36:19-34 100:19-34 138:19-34 176:19-34 210:19-34 257:19-34 294:19-34 328:19-34 366:19-34 399:19-34 428:19-34 458:19-34 508:19-34 561:19-34 598:19-34 716:19-34 754:19-34 792:19-34 843:19-34 879:19-34 907:19-34 935:19-34 966:19-34 1023:19-34 1079:19-34 1108:19-34 1137:19-34 1225:19-34 1254:19-34 1290:19-34 1361:19-34 1441:19-34
 @ ./src/app.tsx 192:0-51 228:19-26
 @ ./src/index.tsx 19:0-24 156:43-46

WARNING in ../../node_modules/apollo-cache-inmemory/lib/objectCache.js
Module Warning (from ../../node_modules/react-scripts/node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/geeberry/Working/company-com-dashboard-nextgen/node_modules/apollo-cache-inmemory/src/objectCache.ts' file: Error: ENOENT: no such file or directory, open '/home/geeberry/Working/company-com-dashboard-nextgen/node_modules/apollo-cache-inmemory/src/objectCache.ts'
 @ ../../node_modules/apollo-cache-inmemory/lib/index.js 5:0-30 5:0-30
 @ ../../node_modules/aws-appsync/lib/client.js 213:30-62
 @ ../../node_modules/aws-appsync/lib/index.js 17:15-34 19:9-28
 @ ./src/services/secure-app-sync-client.js 8:0-40 55:2-15
 @ ./src/services/user/user-svc.ts 6:0-60 36:19-34 100:19-34 138:19-34 176:19-34 210:19-34 257:19-34 294:19-34 328:19-34 366:19-34 399:19-34 428:19-34 458:19-34 508:19-34 561:19-34 598:19-34 716:19-34 754:19-34 792:19-34 843:19-34 879:19-34 907:19-34 935:19-34 966:19-34 1023:19-34 1079:19-34 1108:19-34 1137:19-34 1225:19-34 1254:19-34 1290:19-34 1361:19-34 1441:19-34
 @ ./src/app.tsx 192:0-51 228:19-26
 @ ./src/index.tsx 19:0-24 156:43-46

WARNING in ../../node_modules/apollo-cache-inmemory/lib/optimism.js
Module Warning (from ../../node_modules/react-scripts/node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/geeberry/Working/company-com-dashboard-nextgen/node_modules/apollo-cache-inmemory/src/optimism.ts' file: Error: ENOENT: no such file or directory, open '/home/geeberry/Working/company-com-dashboard-nextgen/node_modules/apollo-cache-inmemory/src/optimism.ts'    
 @ ../../node_modules/apollo-cache-inmemory/lib/readFromStore.js 18:0-48 25:25-37 35:29-33 52:31-35
 @ ../../node_modules/apollo-cache-inmemory/lib/index.js 2:0-32 2:0-32
 @ ../../node_modules/aws-appsync/lib/client.js 213:30-62
 @ ../../node_modules/aws-appsync/lib/index.js 17:15-34 19:9-28
 @ ./src/services/secure-app-sync-client.js 8:0-40 55:2-15
 @ ./src/services/user/user-svc.ts 6:0-60 36:19-34 100:19-34 138:19-34 176:19-34 210:19-34 257:19-34 294:19-34 328:19-34 366:19-34 399:19-34 428:19-34 458:19-34 508:19-34 561:19-34 598:19-34 716:19-34 754:19-34 792:19-34 843:19-34 879:19-34 907:19-34 935:19-34 966:19-34 1023:19-34 1079:19-34 1108:19-34 1137:19-34 1225:19-34 1254:19-34 1290:19-34 1361:19-34 1441:19-34
 @ ./src/app.tsx 192:0-51 228:19-26
 @ ./src/index.tsx 19:0-24 156:43-46
@awe79
Copy link

awe79 commented Mar 17, 2022

Any progress / workarounds regarding this issue? We have the same issue when we to update react-scripts to 5.0.0 for node 17 compatibility.

@jacobgranberry
Copy link
Author

I have not unfortunately, seems like something that may have to be resolved on CRA's end, but the fact that they released 5.0 3 months ago and haven't had a single bug patch for it doesn't give me a lot of confidence in getting a fix anytime soon.

@jacobgranberry
Copy link
Author

@awe79 any luck on your end resolving this?

@awe79
Copy link

awe79 commented Jun 29, 2022

@jacobgranberry nope we postponed the upgrade. Will take al look again in a couple of months.

@pauchena
Copy link

pauchena commented Feb 8, 2023

Hi! Any update on that? I'm currently having the sames warnings with "aws-appsync": "^4.1.9"

@awe79
Copy link

awe79 commented Feb 9, 2023

@pauchena my advise would be to move away from the aws-appsync lib as much as possible since it also has poor/no support for hooks like useQuery and there does not seem to be much development.

Use only the 'aws-appsync-auth-link' to create the authlink and use that to make an ApolloLink for the ApolloClient

@iartemiev iartemiev added the p4 label Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants