Skip to content

Tag: node.js

pm2 Unexpected token import

I have a webserver that works when I use node or nodemon (e.g. “nodemon index.js”). However, when I try to use pm2 (“pm2 start index.js”), I get “SyntaxError: Unexpected token import”. The full error log is below. What am I doing wrong here? Answer Hit the same issue. pm2 r…

What is axios rate limit?

Does anyone know’s the rate limit of the axios api because it is throwing a lot of 429 errors when i am using it here is my codes Answer Axios is an Http Client. Http Clients won’t have a rate limit. However, API’s typically have rate limiting implemented (especially public onces). The error…

How to use optional chaining in Node.js 12

Optional chaining (obj?.param1?.param2) seems to be a great feature and I really wanted to see it implemented and finally get rid of nested ifs, arbitrary functions and what not for such a simple operation. But there’s a problem, it doesn’t work. I updated to Node 12 and I still get an error: or W…

Error: EXDEV: cross-device link not permitted, rename

There are many question similar to my question on stack overflow. However not solved my problem. I am getting this error on Ubuntu 18.04: Error: EXDEV: cross-device link not permitted, rename ‘/tmp/upload_df97d265c452c510805679f968bb4c17’ -> ‘/home/haider/workspaceNode/DSC_0076.JPG’…