#✅ - yarn install building fresh packages waiting for hours. is it normal?

9 messages · Page 1 of 1 (latest)

oblique jasper
#

AWS amplify auto build is stuck with yarn install stating building fresh packages.
#1019643921137139772

livid lance
#

Hi @oblique jasper 👋 , have you tried a clean install locally?

  • rm -rf node_modules yarn.lock
  • yarn install

I'd also recommend running a production build of your app locally to verify it compiles and builds without errors.

winged arch
#

Same problem here. But local build works perfectly fine. Also application successfully deployed on vercel and husky. Issue currently exists only on AWS Amplify pepe_not_stonks. Even reverting changes to last successfull deploy isn't solve the problem.

Problem since <t:1721768400:R>

livid lance
#

@winged arch can you share the complete error trace that you are observing during the build?

winged arch
#

Oh, hi. I already fixed this )

Actually i don't know exactly what helped, but:

  • i updated remote machine OS (newer Linux version)
  • a lot of clearance was made in package.json and yarn.lock (yarn.lock recreated)
  • also updated build script on AWS to use yarn install --frozen-lock instead of yarn install
  • also update Node version on remote machine from 16.x to 20.x
#

Still have no idea why the deployment broke, but it works fine now

winged arch
livid lance
#

Glad to hear that you are unblocked! Based on that error, the root cause is likely related to a combination of outdated yarn.lock file and node version used at build time. An additional contributing factor could be the node_modules that are cached at build time.

 cache:
    paths:
      - node_modules/**/*
feral graniteBOT
#

✅ - yarn install building fresh packages waiting for hours. is it normal?