Hi there,
I’m looking to use the CLI to upload and mantain a large number of image files in our Hubspot filemanager. I’ve installed node.js and the HubSpot tools as instructed here: Install the HubSpot CLI - HubSpot docs
When I attempt to do a fetch I get an error:
hs filemanager fetch --portal=myName "Images"
The result is the first child folder of Images is fetched, as is its first child, and so on for a total of 4 child folders (only fetching the first of each) as is the first file in that folder, but after that nothing. Here’s my error:
PS C:\myLocalDir> hs fetch "Images"
Fetched "Images" from portal ######### from the Desing Manager successfully
Skipped existing "C:\myLocalDir\Images"
[SUCCESS] Completed fetch of folder "Images" to "C:\myLocalDir" from the Design Manager
PS C:\myLocalDir> hs fetch "Images"
Fetched "Images" from portal ######### from the Desing Manager successfully
Wrote folder "C:\myLocalDir\Images"
[SUCCESS] Completed fetch of folder "Images" to "C:\myLocalDir" from the Design Manager
PS C:\myLocalDir> hs fetch --portal=myName "Images"
Fetched "Images" from portal ######### from the Desing Manager successfully
Wrote folder "C:\myLocalDir\Images"
[SUCCESS] Completed fetch of folder "Images" to "C:\myLocalDir" from the Design Manager
PS C:\myLocalDir> hs filemanager fetch --portal=myName "Images"
Fetching folder from "Images" to "C:\myLocalDir\Images" in the File Manager of portal #########
internal/fs/utils.js:622
throw new ERR_INVALID_ARG_TYPE(propName, ['string', 'Buffer', 'URL'], path);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received an instance of WriteStream
at open (fs.js:443:10)
at go$open (C:\Users\me\AppData\Roaming\npm\node_modules\@hubspot\cms-cli\node_modules\graceful-fs\graceful-fs.js:328:14)
at open (C:\Users\me\AppData\Roaming\npm\node_modules\@hubspot\cms-cli\node_modules\graceful-fs\graceful-fs.js:325:12)
at WriteStream$open [as open] (C:\Users\me\AppData\Roaming\npm\node_modules\@hubspot\cms-cli\node_modules\graceful-fs\graceful-fs.js:300:5)
at _openWriteFs (internal/fs/streams.js:366:12)
at WriteStream (internal/fs/streams.js:343:5)
at new WriteStream (C:\Users\me\AppData\Roaming\npm\node_modules\@hubspot\cms-cli\node_modules\graceful-fs\graceful-fs.js:293:29)
at Object.createWriteStream (C:\Users\me\AppData\Roaming\npm\node_modules\@hubspot\cms-cli\node_modules\graceful-fs\graceful-fs.js:316:12)
at Request.<anonymous> (C:\Users\me\AppData\Roaming\npm\node_modules\@hubspot\cms-cli\node_modules\@hubspot\cms-lib\http.js:153:34)
at Request.emit (events.js:315:20) {
code: 'ERR_INVALID_ARG_TYPE'
}
Any pointers much appreciated. Thanks