amplify-hosting
                                
                                 amplify-hosting copied to clipboard
                                
                                    amplify-hosting copied to clipboard
                            
                            
                            
                        Lerna Monorepo - Can't install private github package
Before opening, please confirm:
- [X] I have checked to see if my question is addressed in the FAQ.
- [X] I have searched for duplicate or closed issues.
- [X] I have read the guide for submitting bug reports.
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
App Id
d4qjx8bzy0kti
Region
us-east-1
Amplify Hosting feature
Build settings, Custom builds, Monorepo
Describe the bug
Private github package is not found for Lerna monorepo during build. Although it installs based on custom build settings.
Expected behavior
Private github package should be found after successful install
Reproduction steps
- Set up amplify hosting for react app as monorepo (Lerna)
- Update build settings to create .npmrc and install package
- Run build
Build Settings
version: 1
applications:
  - backend:
      phases:
        build:
          commands:
            - '# Execute Amplify CLI with the helper script'
            - amplifyPush --simple
    frontend:
      phases:
        preBuild:
          commands:
            - yarn install --frozen-lockfile
            - echo -e "always-auth=true\n@apptractive:registry=https://npm.pkg.github.com/\n//npm.pkg.github.com/:_authToken=$NPM_AUTH_TOKEN" > .npmrc
            - yarn add @apptractive/shared
            - yarn add @apptractive/design-system-web
        build:
          commands:
            - yarn run build
      artifacts:
        baseDirectory: build
        files:
          - '**/*'
      cache:
        paths:
          - node_modules/**/*
    appRoot: packages/backoffice-app
Additional information
Also tried for another react frontend
AppId d3cy3g6nh4jbkc