Developer forum

Forum » Dynamicweb 10 » Issue with @dynamicweb/cli 1.0.14

Issue with @dynamicweb/cli 1.0.14

Claus Kortbek
Reply

Hello,

I have an issue when I call "dw files -e $scanFolder $tempfolder" in with dynamicweb/cli.

When I change the version to 1.0.13, everything works again.

I get the following error: 

2025-07-07T10:50:35.1642277Z file:///C:/npm/prefix/node_modules/@dynamicweb/cli/bin/downloader.js:14
2025-07-07T10:50:35.1644705Z         throw new Error(`No files found in directory '${dirPath}', if you want to download all folders recursively include the -r flag`);
2025-07-07T10:50:35.1645075Z                                                         ^
2025-07-07T10:50:35.1645137Z 
2025-07-07T10:50:35.1645420Z ReferenceError: dirPath is not defined
2025-07-07T10:50:35.1645698Z     at getFileNameFromResponse (file:///C:/npm/prefix/node_modules/@dynamicweb/cli/bin/downloader.js:14:57)
2025-07-07T10:50:35.1646043Z     at download (file:///C:/npm/prefix/node_modules/@dynamicweb/cli/bin/commands/files.js:201:33)
2025-07-07T10:50:35.1646359Z     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2025-07-07T10:50:35.1646702Z     at async handleFiles (file:///C:/npm/prefix/node_modules/@dynamicweb/cli/bin/commands/files.js:88:13)
2025-07-07T10:50:35.1646841Z 

Replies

 
Frederik Nielsen Dynamicweb Employee
Frederik Nielsen
Reply

Hi Claus

We changed this message from being a console.log to an error instead, when a dir is specified without any files or folders.
When trying this out locally it looks like the following in 1.0.13:

> dw files -e dir out --host <host> --apiKey <key>
Downloading dir Recursive=true
No files found in directory 'dir', if you want to download all folders recursively include the -r flag

While when running on 1.0.14:

> dw files -e dir out --host <host> --apiKey <key>
Downloading Files/test Recursive=true
file:///C:/Users/frn/AppData/Roaming/npm/node_modules/@dynamicweb/cli/bin/downloader.js:14
        throw new Error(`No files found in directory '${dirPath}', if you want to download all folders recursively include the -r flag`);
                                                        ^

ReferenceError: dirPath is not defined
    at getFileNameFromResponse (file:///C:/Users/frn/AppData/Roaming/npm/node_modules/@dynamicweb/cli/bin/downloader.js:14:57)
    at download (file:///C:/Users/frn/AppData/Roaming/npm/node_modules/@dynamicweb/cli/bin/commands/files.js:201:33)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async handleFiles (file:///C:/Users/frn/AppData/Roaming/npm/node_modules/@dynamicweb/cli/bin/commands/files.js:88:13)

 

 

I do see we have a small bug with showing the actual dirPath as it's not properly referenced, however I don't see how this should break anything as there seems to be no files found in the folder you're trying to export, as such it doesn't matter if it resolves properly or not.

Are you sure there's any files in your dirPath?

 

//Frederik

 

You must be logged in to post in the forum