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

AWS Amplify Main Branch does not build in fresh workspace #9858

Closed
3 tasks done
bensewell opened this issue May 2, 2022 · 3 comments
Closed
3 tasks done

AWS Amplify Main Branch does not build in fresh workspace #9858

bensewell opened this issue May 2, 2022 · 3 comments
Assignees

Comments

@bensewell
Copy link
Contributor

bensewell commented May 2, 2022

Before opening, please confirm:

JavaScript Framework

Not applicable

Amplify APIs

Not applicable

Amplify Categories

Not applicable

Environment information

# Put output below this line
  System:
    OS: Linux 5.16 Ubuntu 20.04.4 LTS (Focal Fossa)
    CPU: (16) x64 AMD EPYC 7B13
    Memory: 38.90 GB / 62.80 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
    Yarn: 1.22.18 - ~/.nvm/versions/node/v16.14.2/bin/yarn
    npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
  npmPackages:
    @babel/cli: 7.17.0 => 7.17.0 
    @babel/core: 7.17.2 => 7.17.2 (7.15.5, 7.17.10, 7.9.0, 7.12.9)
    @babel/preset-env: ^7.0.0 => 7.17.10 (7.3.4, 7.9.0)
    @babel/preset-react: ^7.0.0 => 7.16.7 (7.9.1)
    @types/blob-util:  1.3.3 
    @types/bluebird:  3.5.29 
    @types/chai:  4.2.7 
    @types/chai-jquery:  1.1.40 
    @types/jest: ^24.0.18 => 24.9.1 
    @types/jquery:  3.3.31 
    @types/lodash:  4.14.149 
    @types/minimatch:  3.0.3 
    @types/mocha:  5.2.7 
    @types/node: ^8.9.5 => 8.10.66 (17.0.31)
    @types/puppeteer: 1.3.0 => 1.3.0 
    @types/sinon:  7.5.1 
    @types/sinon-chai:  3.2.3 
    babel-loader: ^8.0.0 => 8.2.5 (8.1.0)
    bundlewatch: ^0.3.1 => 0.3.3 
    codecov: ^3.6.5 => 3.8.3 
    compression-webpack-plugin: ^1.1.3 => 1.1.12 
    cypress: ^3.2.0 => 3.8.3 
    husky: ^3.0.5 => 3.1.0 
    jest: ^24.x.x => 24.9.0 (23.6.0)
    jest-config: 24.8.0 => 24.8.0 (24.9.0, 23.6.0)
    json-loader: ^0.5.7 => 0.5.7 
    lerna: ^3.13.1 => 3.22.1 
    prettier: ^2.4.1 => 2.6.2 (1.19.1)
    pretty-quick: ^1.11.1 => 1.11.1 
    rimraf: ^2.6.2 => 2.7.1 (3.0.2, 2.6.3, 2.2.8)
    rollup: ^0.67.4 => 0.67.4 
    rollup-plugin-commonjs: ^9.2.0 => 9.3.4 
    rollup-plugin-json: ^3.1.0 => 3.1.0 
    rollup-plugin-node-resolve: ^4.0.0 => 4.2.4 
    rollup-plugin-sourcemaps: ^0.4.2 => 0.4.2 
    rollup-plugin-typescript: ^1.0.0 => 1.0.1 
    source-map-loader: ^0.2.1 => 0.2.4 
    ts-jest: ^24.x.x => 24.3.0 
    tslint: ^5.7.0 => 5.20.1 
    tslint-config-airbnb: ^5.8.0 => 5.11.2 
    typedoc: ^0.16.9 => 0.16.11 
    typescript: ~3.8.3 => 3.8.3 (3.9.5, 3.7.7)
    uglifyjs-webpack-plugin: ^0.4.6 => 0.4.6 
    uuid-validate: ^0.0.3 => 0.0.3 
    webpack: ^4.32.0 => 4.46.0 (4.42.0)
    webpack-bundle-analyzer: ^3.3.2 => 3.9.0 
    webpack-cli: ^3.1.0 => 3.3.12 
    winston: ^3.2.1 => 3.7.2 
    wml: 0.0.83 => 0.0.83 
  npmGlobalPackages:
    corepack: 0.10.0
    node-gyp: 9.0.0
    npm: 8.5.0
    pnpm: 6.32.6
    typescript: 4.6.3
    yarn: 1.22.18

Describe the bug

Following the instructions in CONTRIBUTING.md, the main branch at (949d17b) is not building.

I have tried building on my local machine (Windows) and GitPod environment too.

Expected behavior

Following the instructions in CONTRIBUTING.md should build the codebase with no errors.

Reproduction steps

  1. Open a fresh build environment on GitPod with the link https://gitpod.io/#/github.com/aws-amplify/amplify-js.
  2. Run "yarn", "yarn bootstrap", "yarn build"

Error reported:

amazon-cognito-identity-js: TypeError: /workspace/amplify-js/packages/amazon-cognito-identity-js/src/AuthenticationDetails.js: isTopicReference is not a function

Code Snippet

// Put your code below this line.

Log output

Actual outcome from "yarn build":

yarn run v1.22.18
$ lerna run build --stream
lerna notice cli v3.22.1
lerna info versioning independent
lerna info Executing command in 27 packages: "yarn run build"
@aws-amplify/ui: $ npm run clean && webpack && copyfiles -u 1 ./src/*.css.d.ts ./lib
aws-amplify-vue: $ vue-cli-service build --target lib --name aws-amplify-vue ./src/Amplify.vue
aws-amplify-react-native: $ npm run lint && npm run clean && babel src --out-dir dist --extensions '.ts,.tsx,.js,.jsx' --copy-files
amazon-cognito-identity-js: $ npm run clean && npm run build:cjs && npm run build:esm && npm run build:umd
@aws-amplify/core: $ npm run clean && npm run generate-version && npm run build:esm && npm run build:cjs
@aws-amplify/ui: > @aws-amplify/ui@2.0.5 clean
@aws-amplify/ui: > rimraf dist lib
amazon-cognito-identity-js: > amazon-cognito-identity-js@5.2.8 clean
amazon-cognito-identity-js: > rimraf lib es
@aws-amplify/core: > @aws-amplify/core@4.5.2 clean
@aws-amplify/core: > rimraf lib-esm lib dist
aws-amplify-react-native: > aws-amplify-react-native@6.0.4 lint
aws-amplify-react-native: > eslint src
aws-amplify-vue: -  Building for production as library (commonjs,umd,umd-min)...
amazon-cognito-identity-js: > amazon-cognito-identity-js@5.2.8 build:cjs
amazon-cognito-identity-js: > cross-env BABEL_ENV=commonjs babel src --out-dir lib
@aws-amplify/core: > @aws-amplify/core@4.5.2 generate-version
@aws-amplify/core: > genversion src/Platform/version.ts --es6 --semi
@aws-amplify/core: > @aws-amplify/core@4.5.2 build:esm
@aws-amplify/core: > rimraf lib-esm && node ./build es6
amazon-cognito-identity-js: TypeError: /workspace/amplify-js/packages/amazon-cognito-identity-js/src/AuthenticationDetails.js: isTopicReference is not a function
amazon-cognito-identity-js:     at Scope.isStatic (/workspace/amplify-js/node_modules/@babel/traverse/lib/scope/index.js:439:52)
amazon-cognito-identity-js:     at Scope.maybeGenerateMemoised (/workspace/amplify-js/node_modules/@babel/traverse/lib/scope/index.js:457:14)
amazon-cognito-identity-js:     at DestructuringTransformer.init (/workspace/amplify-js/node_modules/@babel/plugin-transform-destructuring/lib/index.js:298:31)
amazon-cognito-identity-js:     at convertVariableDeclaration (/workspace/amplify-js/node_modules/@babel/plugin-transform-destructuring/lib/index.js:385:21)
amazon-cognito-identity-js:     at PluginPass.VariableDeclaration (/workspace/amplify-js/node_modules/@babel/plugin-transform-destructuring/lib/index.js:591:9)
amazon-cognito-identity-js:     at newFn (/workspace/amplify-js/node_modules/@babel/traverse/lib/visitors.js:177:21)
amazon-cognito-identity-js:     at NodePath._call (/workspace/amplify-js/node_modules/@babel/traverse/lib/path/context.js:53:20)
amazon-cognito-identity-js:     at NodePath.call (/workspace/amplify-js/node_modules/@babel/traverse/lib/path/context.js:40:17)
amazon-cognito-identity-js:     at NodePath.visit (/workspace/amplify-js/node_modules/@babel/traverse/lib/path/context.js:100:31)
amazon-cognito-identity-js:     at TraversalContext.visitQueue (/workspace/amplify-js/node_modules/@babel/traverse/lib/context.js:103:16) {
amazon-cognito-identity-js:   code: 'BABEL_TRANSFORM_ERROR'
amazon-cognito-identity-js: }
amazon-cognito-identity-js: npm ERR! Lifecycle script `build:cjs` failed with error: 
amazon-cognito-identity-js: npm ERR! Error: command failed 
amazon-cognito-identity-js: npm ERR!   in workspace: amazon-cognito-identity-js@5.2.8 
amazon-cognito-identity-js: npm ERR!   at location: /workspace/amplify-js/packages/amazon-cognito-identity-js 
amazon-cognito-identity-js: error Command failed with exit code 1.
amazon-cognito-identity-js: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run build exited 1 in 'amazon-cognito-identity-js'
lerna WARN complete Waiting for 4 child processes to exit. CTRL-C to exit immediately.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command```
</details>


### 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_
@svidgen
Copy link
Member

svidgen commented May 2, 2022

Seem to have been introduced here. I was able to repro the broken build and fix by resolving @babel/traverse to 7.17.9.

@svidgen svidgen self-assigned this May 2, 2022
@svidgen
Copy link
Member

svidgen commented May 2, 2022

The fix is merged. You should be all set.

Thanks for submitting the issue!

@svidgen svidgen closed this as completed May 2, 2022
@github-actions
Copy link

github-actions bot commented May 3, 2023

This issue 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 amplify-help forum.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants