Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Accepted Answer
Hi there,
I’ve just tried this out and it seems to all be working as expected.
I’ve created a demo project with the exact same steps as you:
https://github.com/bobbyiliev/serverless-hello-wolrd-node
Would you mind trying to run this and let me know if you are still seeing the issue:
git clone https://github.com/bobbyiliev/serverless-hello-wolrd-node.git
doctl serverless deploy serverless-hello-wolrd-node
doctl serverless functions invoke sample/hello
EDIT: I’ve just received some feedback from our FaaS team, in order for your function to be built remotely, you need to specify the --remote-build flag.
Alternatively, you need to install npm locally so that the build could succeed on your local machine too.
Let me know how it goes!
Best,
Bobby
This comment has been deleted
I encountered the exact same error. Read the output message with care, and you can the deploy is trying to run npm on your local machine, and your npm is not in its $PATH envoirment.
On my machine, that was caused by install node via nvm. Thus adding a link of your npm cli to /usr/local/bin should fix this issue.