Help with HubSpot CLI Project Upload Error: @rollup/rollup-linux-x64-gnu Issue

Hello HubSpot Community,

I’ve been working on a private app project with a basic UI extension, but I’m running into a persistent error when attempting to upload the project using the HubSpot CLI. Here’s the error message I receive:
Error: Cannot find module @rollup/rollup-linux-x64-gnu. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.

Environment Setup:

  • OS: Windows 11
  • Node.js version: 20.17.0
  • npm version: 11.0.0
  • HubSpot CLI version: 6.4.0

Troubleshooting Steps:

  1. Deleted package-lock. json and node modules folder from both extensions and app.functions folders

  2. Cleared NPM cache in both folders (npm cache clean --force)

  3. Ran npm install in both folders, no errors

  4. attempted to reupload with same result.
    The issue seems tied to npm’s handling of optional dependencies, specifically related to @rollup/rollup-linux-x64-gnu, which isn’t relevant to my Windows environment.

  5. Has anyone encountered this specific issue with @rollup/rollup-linux-x64-gnu or similar optional dependencies on Windows?

  6. Are there any workarounds to prevent npm from attempting to install unnecessary optional dependencies?

  7. Would downgrading or upgrading specific versions of Node.js, npm, or the HubSpot CLI help in this scenario?

  8. Are there additional steps I can take to troubleshoot or resolve this?
    Thank you in advance!

Hey, @EAmoroso :waving_hand: Thanks for your post. Looking at the GitHub issue linked from your error message, it looks like this is an issue without an official resolution from the npm team. I see why it’s challenging due to the discrepancy of using a Windows machine and getting Linux-based warning. Hey, @zach_threadint @SteveHTM @JBeatty have you run into this issue during your project work?

Thanks! — Jaycee

@EAmoroso - I have not come across this issue, so am unable to help.

Steve