[MacOS] Deploy command (using npm) doesn't run

I’m creating a basic website with data snapshots and want to create a Git repository for the work I’m doing. I’m using Observable Framework as the command-line interface (CLI) and running commands in my terminal.

After I run the server locally in the terminal and do my work, I tried the npm run deploy/build command. But I’m not getting any response from the terminal.

hello-framework % npm run dev

dev
observable preview

Observable Framework v1.0.0
http://127.0.0.1:3010/

GET /
GET /_observablehq/theme-air,near-midnight.css
GET /_observablehq/client.js
GET /_observablehq/runtime.js
GET /_observablehq/stdlib.js
socket open /_observablehq
↑ {
type: ‘hello’,
path: ‘/’,
hash: ‘4f4a001082772cbdde120b299ac7af3f09b4aa28338f85aee59d9a62dbf3e5a5’
}
hello-framework % npm run deploy <---- No response

FYI
I’m using sample files from the Observable Framework tutorial and I’m learning how to publish my site on observablehq.cloud and Github (source:https://observablehq.com/framework/getting-started#3.-publish)

Hi, thanks for trying Observable Framework! We’ve seen issues where the shell needs to be reset after running npm run dev. Can you try the deploy step in a new shell? Also, what platform are you on?

I’m on MacOS. I tried to reset and tried deploy in a new shell but no response. Does the command take a while to run? It looks like when R is reading a lot of data and the cursor doesn’t move and further commands don’t run.

I tried the deploy step in a new shell. I got the following response but no prompt to create a new project or configure deployment.

socket close /_observablehq
GET /weather
GET /_observablehq/theme-air,near-midnight,alt,wide.css
GET /_observablehq/client.js
GET /_observablehq/stdlib.js
GET /_observablehq/runtime.js
socket open /_observablehq
↑ {
type: ‘hello’,
path: ‘/weather’,
hash: ‘0483ff2153dc029106015f77c150722d08542ef24c79d13fbe1cc5257a1bfb71’
}

GET /_file/data/forecast.json
load docs/data/forecast.json.js → [fresh] success 83.25 KiB in 0ms

Are you just trying to run it on your local machine? In that case, you don’t need to ‘deploy’, you simply run the dev server (by running npm run dev). You can then simply open your browser to the url shown (http://127.0.0.1:3010/) and that would render the pages and run your data loaders when opening the pages.

If you wanted to deploy the project to Observable, you would then follow the instructions here.

The output you shared looks like the result of running the preview command, aliased as npm run dev. To deploy you’ll need to use npm run deploy.

The preview server (npm run dev) is how you would preview your project while building it, and is intended as an aid while writing the code of your project. The deploy command npm run deploy) will then upload the built version of your project to Observable.

Thanks, that helps me figure out that the previous output didn’t come from npm run deploy, this command just doesn’t work while I’m running the server locally. We got close to the solution. What worked is first killing the preview server I was working on with Control-C, make sure the current directory is still correct, and then running npm run deploy with the preview server “off”.
@eagereyes might want to flag this because I’m not sure if this is the intended workflow. Thanks all!