Platform 2025.2 Build Error: npm cannot find /tmp/extensions/package.json

Hello HubSpot Developer Community,

I’m experiencing a persistent build failure when trying to deploy UI Extensions cards using the HubSpot CLI. This appears to be a backend platform issue with version 2025.2.

Setup:

  • Portal ID: 147047874
  • Platform Version: 2025.2
  • HubSpot CLI: v7.7.0
  • Project Type: UI Extensions with React cards

The Problem: Every build fails during HubSpot’s npm install phase with the same error:

npm error path /tmp/extensions/package.jsonnpm error code ENOENTnpm error enoent Could not read package.json: ENOENT: no such file or directorynpm error enoent This is related to npm not being able to find a file.

What I’ve Verified:

  • Project structure is correct (hsproject.json, src/app/ structure, proper -hsmeta.json files)
  • package.json exists in all correct locations with proper dependencies
  • Files upload successfully to HubSpot
  • Using absolute entrypoint paths as required
  • OAuth and CLI authentication work perfectly
  • Local validation passes

The Issue: The error occurs on HubSpot’s build servers, not during upload. The build system appears to be looking for /tmp/extensions/package.json on your servers, but this directory either doesn’t exist or isn’t being properly created during the build process.

Questions:

  1. Has anyone else encountered this /tmp/extensions/ error with platform 2025.2?
  2. Is there a workaround or configuration change that resolves this?
  3. Should I be using a different platform version?
  4. Do I need specific beta enrollment or permissions for UI Extensions?

I found a similar error mentioned in an August 2024 community post about “unexpected error building extension files” that referenced the same /tmp/extensions/ path.

Any insights or workarounds would be greatly appreciated. Thanks in advance for any help. Thanks everyone.

Hi @FlowViber,
Thank you for posting to the Community! I’d like to tag in some Top Contributors to see if they are able to reproduce this -- Hi @mangelet @Mike_Eastwood and @ChristinaKay Are any of you able to reproduce this? If not, do you have any tips on how to resolve?
Thank you!
Cassie, Community Manager

Thanks for helping out!