Skip to content

Conversation

@ericclemmons
Copy link
Contributor

When running yarn build locally, I identified a race-condition where @aws-amplify/api-graphql's build was failing due to @aws-amplify/pubsub not being built yet.

This has come up in the past, and the solution is simple: explicitly add dependencies to package.json:

import PubSub from '@aws-amplify/pubsub';

Missing @aws-amplify/pubsub:

"dependencies": {
"@aws-amplify/api-rest": "^1.0.8",
"@aws-amplify/auth": "^3.2.3",
"@aws-amplify/cache": "^3.1.6",
"@aws-amplify/core": "^3.2.3",
"graphql": "14.0.0",
"uuid": "^3.2.1",
"zen-observable-ts": "0.8.19"
},

With this change, lerna's topological sort correctly build @aws-amplify/pubsub before @aws-amplify/api-graphql.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ericclemmons ericclemmons self-assigned this Apr 9, 2020
@ericclemmons ericclemmons requested a review from Amplifiyer April 9, 2020 23:52
@ericclemmons ericclemmons marked this pull request as ready for review April 9, 2020 23:54
@codecov
Copy link

codecov bot commented Apr 10, 2020

Codecov Report

Merging #5352 into master will not change coverage by %.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5352   +/-   ##
=======================================
  Coverage   72.90%   72.90%           
=======================================
  Files         195      195           
  Lines       11466    11466           
  Branches     2234     2234           
=======================================
  Hits         8359     8359           
  Misses       2937     2937           
  Partials      170      170           
Impacted Files Coverage Δ
packages/core/src/Platform/version.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27355a4...cb026c1. Read the comment docs.

Copy link
Contributor

@Amplifiyer Amplifiyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢 it

@ericclemmons ericclemmons merged commit ffb6514 into aws-amplify:master Apr 10, 2020
@ericclemmons ericclemmons deleted the add-missing-pubsub branch April 10, 2020 00:15
@github-actions
Copy link

This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants