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:
-
Deleted package-lock. json and node modules folder from both extensions and app.functions folders
-
Cleared NPM cache in both folders (npm cache clean --force)
-
Ran npm install in both folders, no errors
-
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. -
Has anyone encountered this specific issue with @rollup/rollup-linux-x64-gnu or similar optional dependencies on Windows?
-
Are there any workarounds to prevent npm from attempting to install unnecessary optional dependencies?
-
Would downgrading or upgrading specific versions of Node.js, npm, or the HubSpot CLI help in this scenario?
-
Are there additional steps I can take to troubleshoot or resolve this?
Thank you in advance!