Currently I am using v7.5.4 and was planning to migrate the private apps I am using to the projects platform from this article Migrate an existing private app to the projects framework - HubSpot docs
But when I update to the latest CLI version and ran any hs command I keep getting this error:
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension “” for /Users/currentuser/.config/yarn/global/node_modules/@hubspot/cli/bin/hs. Loading extensionless files is not supported inside of “type”:“module” package.json contexts. The package.json file /Users/currentuser/.config/yarn/global/node_modules/@hubspot/cli/package.json caused this “type”:“module” context. Try changing /Users/currentuser/.config/yarn/global/node_modules/@hubspot/cli/bin/hs to have a file extension. Note the “bin” field of package.json can point to a file with an extension, for example {“type”:“module”,“bin”:{“hs”:“./bin/hs.js”}}
Hi @SaltyKaren and Happy Thursday!
Thanks for reaching out to the HubSpot Community!
Here is the documentation “Projects CLI reference” that might help you.
Also, I’d love to put you in touch with our Top Experts: Hi @Anton, @sylvain_tirreau and @zach_threadint do you have suggestions to help @SaltyKaren, please?
Have a wonderful day and thanks so much for your help!
Bérangère
I’m getting the same error. Have tried uninstalling and reinstalling, and I’ve tried deleting the node_modules folder and then reinstalling. No luck.
Hi,
I have no issues with version 7.6.1 (note, the latest version is 7.6.1, not 7.6.0, as indicated in your title).
A few tips, as I see you’re using modules and Node globally.
The best way to control your packages is to manage your Node versions with NVM, to have one node_modules per project, not a single global one, and to use the local version of Hubspot CLI (in this case, you no longer type “hs <command>” but “npx hs <command>”). This way, you control the integrity of your packages and can juggle your Node versions. This way, it’s also possible to delete the node_module from the project to cleanly reinstall dependencies.
But first, try to see if you have the latest version (7.6.1, not 7.6.0).
G’day, I was able to fix my issue of this today -- I needed to update node.js! Hopefully this helps you.