Questions tagged [vercel-micro]

Use this for Vercel Micro framework

Vercel micro framework

7 questions
2
votes
0 answers

Vercel deployment error : BUILD_UTILS_SPAWN_1: Command "npm run build" exited with 1 & Error: Command "npm run build" exited with 1

I'm facing this: Error: Command "npm run build" exited with 1 Deployment completed BUILD_UTILS_SPAWN_1: Command "npm run build" exited with 1 I also tried, by setting environment variable CI to false. It would look like this: CI = false What to…
2
votes
1 answer

How to use nested asychronous code correctly?

I've created a little api using micro. Running localhost:3000/get-status should return the data object. So far the console.log() is printing the expected object. But on the browser I get Endpoint not found and on the server I get the error Si7021…
user3142695
  • 15,844
  • 47
  • 176
  • 332
1
vote
0 answers

Sending POST request to Vercel API page from USR-K2

I am trying some IoT stuff and i use USR-K2 to receive data and send them to website api where I proccess them. Website is hosted on Vercel. The problem is I cant really read data on production. When i send the data to my localhost, it works…
1
vote
2 answers

How to run dat-node as a micro service?

UPDATE: Added the full server code. Notice that the route for static content is working fine, only the one relative to Dat fails. Also, I'm running node 10.8.0 with no transpiler or anything, server is ran with micro -l tcp://0.0.0.0:$PORT I'm…
Yerko Palma
  • 12,041
  • 5
  • 33
  • 57
0
votes
0 answers

Vercel API Throttling Limit

Is there a possibility to set an API limit for a specific endpoint in Vercel?. I am Building an Next.js Application for a certain endpoint I want to limit the number of incoming request from the user's is there a possibility to do it? Is there a…
imnotiam
  • 94
  • 8
0
votes
0 answers

Mongoose .findOne() breaks when deployed

I have Micro endpoints for my API that uses Mongoose. All of them work fine, except the one that uses .findOne(). This one returns the right data locally, but not when deployed to Now v2. Here is the endpoint: const { createError, run, send } =…
YepNamesJames
  • 281
  • 1
  • 2
  • 15
0
votes
1 answer

HowTo test Micro EndPoints with Ava and Test-Listen

Let's say I have this routes.js in micro: const hello = async (req, res) => { send(res, 200, `Hello, ${req.params.who}`); }); module.exports = router( post('/hello/:who', hello), ); I have the following test set-up, but unfortunately I am…
Stephan Kristyn
  • 15,015
  • 14
  • 88
  • 147