#amazon-web-services #webpack #graphql #aws-amplify
Вопрос:
Я следую этому уроку https://docs.amplify.aws/start/q/integration/react/
На этом этапе https://docs.amplify.aws/start/getting-started/setup/q/integration/react/#install-amplify-libraries после установки aws-amplify
и @aws-amplify/ui-react
В тот момент, когда я пытаюсь импортировать aws-усиливается следующим образом: import Amplify from "aws-amplify";
я получаю эту ошибку в webpack:
Module not found: Error: Can't resolve './graphql' in '/home/ishan/amplify_start/node_modules/@aws-amplify/pubsub/node_modules/graphql'
Did you mean 'graphql.js'?
BREAKING CHANGE: The request './graphql' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
@ ./node_modules/@aws-amplify/pubsub/lib-esm/Providers/AWSAppSyncRealTimeProvider.js 90:0-39 221:41-53 235:45-57 354:49-61 512:37-49 528:46-58 552:37-49
@ ./node_modules/@aws-amplify/pubsub/lib-esm/Providers/index.js 15:0-45 15:0-45
@ ./node_modules/@aws-amplify/pubsub/lib-esm/index.js 14:0-28 14:0-28
@ ./node_modules/aws-amplify/lib-esm/index.js 27:0-45 27:0-45
@ ./src/components/root/root_component.js 35:0-34
@ ./src/index.js 10:0-61 11:50-63
ERROR in ./node_modules/@aws-amplify/pubsub/node_modules/graphql/index.mjs 36:0-47:50
Module not found: Error: Can't resolve './type' in '/home/ishan/amplify_start/node_modules/@aws-amplify/pubsub/node_modules/graphql'
Did you mean 'index.js'?
BREAKING CHANGE: The request './type' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
@ ./node_modules/@aws-amplify/pubsub/lib-esm/Providers/AWSAppSyncRealTimeProvider.js 90:0-39 221:41-53 235:45-57 354:49-61 512:37-49 528:46-58 552:37-49
@ ./node_modules/@aws-amplify/pubsub/lib-esm/Providers/index.js 15:0-45 15:0-45
@ ./node_modules/@aws-amplify/pubsub/lib-esm/index.js 14:0-28 14:0-28
@ ./node_modules/aws-amplify/lib-esm/index.js 27:0-45 27:0-45
@ ./src/components/root/root_component.js 35:0-34
@ ./src/index.js 10:0-61 11:50-63
ERROR in ./node_modules/@aws-amplify/pubsub/node_modules/graphql/index.mjs 49:0-53:205
Module not found: Error: Can't resolve './language' in '/home/ishan/amplify_start/node_modules/@aws-amplify/pubsub/node_modules/graphql'
Did you mean 'index.js'?
BREAKING CHANGE: The request './language' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
@ ./node_modules/@aws-amplify/pubsub/lib-esm/Providers/AWSAppSyncRealTimeProvider.js 90:0-39 221:41-53 235:45-57 354:49-61 512:37-49 528:46-58 552:37-49
@ ./node_modules/@aws-amplify/pubsub/lib-esm/Providers/index.js 15:0-45 15:0-45
@ ./node_modules/@aws-amplify/pubsub/lib-esm/index.js 14:0-28 14:0-28
@ ./node_modules/aws-amplify/lib-esm/index.js 27:0-45 27:0-45
@ ./src/components/root/root_component.js 35:0-34
@ ./src/index.js 10:0-61 11:50-63
ERROR in ./node_modules/@aws-amplify/pubsub/node_modules/graphql/index.mjs 55:0-101
Module not found: Error: Can't resolve './execution' in '/home/ishan/amplify_start/node_modules/@aws-amplify/pubsub/node_modules/graphql'
Did you mean 'index.js'?
BREAKING CHANGE: The request './execution' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
@ ./node_modules/@aws-amplify/pubsub/lib-esm/Providers/AWSAppSyncRealTimeProvider.js 90:0-39 221:41-53 235:45-57 354:49-61 512:37-49 528:46-58 552:37-49
@ ./node_modules/@aws-amplify/pubsub/lib-esm/Providers/index.js 15:0-45 15:0-45
@ ./node_modules/@aws-amplify/pubsub/lib-esm/index.js 14:0-28 14:0-28
@ ./node_modules/aws-amplify/lib-esm/index.js 27:0-45 27:0-45
@ ./src/components/root/root_component.js 35:0-34
@ ./src/index.js 10:0-61 11:50-63
ERROR in ./node_modules/@aws-amplify/pubsub/node_modules/graphql/index.mjs 56:0-68
Module not found: Error: Can't resolve './subscription' in '/home/ishan/amplify_start/node_modules/@aws-amplify/pubsub/node_modules/graphql'
Did you mean 'index.js'?
BREAKING CHANGE: The request './subscription' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
@ ./node_modules/@aws-amplify/pubsub/lib-esm/Providers/AWSAppSyncRealTimeProvider.js 90:0-39 221:41-53 235:45-57 354:49-61 512:37-49 528:46-58 552:37-49
@ ./node_modules/@aws-amplify/pubsub/lib-esm/Providers/index.js 15:0-45 15:0-45
@ ./node_modules/@aws-amplify/pubsub/lib-esm/index.js 14:0-28 14:0-28
@ ./node_modules/aws-amplify/lib-esm/index.js 27:0-45 27:0-45
@ ./src/components/root/root_component.js 35:0-34
@ ./src/index.js 10:0-61 11:50-63
ERROR in ./node_modules/@aws-amplify/pubsub/node_modules/graphql/index.mjs 58:0-60:675
Module not found: Error: Can't resolve './validation' in '/home/ishan/amplify_start/node_modules/@aws-amplify/pubsub/node_modules/graphql'
Did you mean 'index.js'?
BREAKING CHANGE: The request './validation' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
@ ./node_modules/@aws-amplify/pubsub/lib-esm/Providers/AWSAppSyncRealTimeProvider.js 90:0-39 221:41-53 235:45-57 354:49-61 512:37-49 528:46-58 552:37-49
@ ./node_modules/@aws-amplify/pubsub/lib-esm/Providers/index.js 15:0-45 15:0-45
@ ./node_modules/@aws-amplify/pubsub/lib-esm/index.js 14:0-28 14:0-28
@ ./node_modules/aws-amplify/lib-esm/index.js 27:0-45 27:0-45
@ ./src/components/root/root_component.js 35:0-34
@ ./src/index.js 10:0-61 11:50-63
ERROR in ./node_modules/@aws-amplify/pubsub/node_modules/graphql/index.mjs 62:0-64
Module not found: Error: Can't resolve './error' in '/home/ishan/amplify_start/node_modules/@aws-amplify/pubsub/node_modules/graphql'
Did you mean 'index.js'?
BREAKING CHANGE: The request './error' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
@ ./node_modules/@aws-amplify/pubsub/lib-esm/Providers/AWSAppSyncRealTimeProvider.js 90:0-39 221:41-53 235:45-57 354:49-61 512:37-49 528:46-58 552:37-49
@ ./node_modules/@aws-amplify/pubsub/lib-esm/Providers/index.js 15:0-45 15:0-45
@ ./node_modules/@aws-amplify/pubsub/lib-esm/index.js 14:0-28 14:0-28
@ ./node_modules/aws-amplify/lib-esm/index.js 27:0-45 27:0-45
@ ./src/components/root/root_component.js 35:0-34
@ ./src/index.js 10:0-61 11:50-63
ERROR in ./node_modules/@aws-amplify/pubsub/node_modules/graphql/index.mjs 64:0-98:42
Module not found: Error: Can't resolve './utilities' in '/home/ishan/amplify_start/node_modules/@aws-amplify/pubsub/node_modules/graphql'
Did you mean 'index.js'?
BREAKING CHANGE: The request './utilities' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
@ ./node_modules/@aws-amplify/pubsub/lib-esm/Providers/AWSAppSyncRealTimeProvider.js 90:0-39 221:41-53 235:45-57 354:49-61 512:37-49 528:46-58 552:37-49
@ ./node_modules/@aws-amplify/pubsub/lib-esm/Providers/index.js 15:0-45 15:0-45
@ ./node_modules/@aws-amplify/pubsub/lib-esm/index.js 14:0-28 14:0-28
@ ./node_modules/aws-amplify/lib-esm/index.js 27:0-45 27:0-45
@ ./src/components/root/root_component.js 35:0-34
@ ./src/index.js 10:0-61 11:50-63
Любые предложения были бы очень ценны.