To be honest, I did not want to do this, because in my opinion, why should I use the command line and type letters with the keyboard instead of using a GUI and just drag n drop a folder. But OK, I am not this old.
It took me a while to be able to use the CLI. Therefore, here’s a beginner’s HowTo:
My needs are simple: I just want to deploy a local folder.
I had to reinstall Windows and Visual Studio. During the VS installation, I chose to install node.js. The problem was, that no environment variable was created and therefore, the command npm install netlify-cli -g was not known. To solve this, simply add the new environment variable:
Win+R
sysdm.cpl > OK
Advanced > Environment variables…
Under “System variables” double click “Path”
Add new one at the end, e.g. “C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VisualStudio\NodeJs”
I got a new laptop and therefore had to reinstall Visual Studio and so on.
I followed above steps, but when I exceute netlify deploy -p --dir=/Users/.../publish/wwwroot --site=beautiful-uploader-234269
(of course with my site name), I only get the error
Netlify Build
────────────────────────────────────────────────────────────────
Version @netlify/build 33.5.0
Flags
{}
Configuration error
────────────────────────────────────────────────────────────────
Error message
Failed retrieving site data for site [my site name]: Not Found. Double-check your login status with ‘netlify status’ or contact support with details of your error.
'netlify status returns my credentials, so it looks like everything is fine.