Open Source licenses have different scopes and different impacts, that's why there are so many different licenses. You will have to look at each of the licenses separately. Most obligations for you would only be triggered as soon as you distribute your software, some if you modify any code of libraries, some if you combine components of one (copyleft) license with other components with different licenses.
Your question is very generic, therefore you have to check how it applies to your situation and the specific npm packages you use.
For a backend server, which is under your control and where the code is not distributed to others, the use of OSS does not count as 'distribution', so you will not have to comply with respective obligations in the licenses. However, if your backend server is also serving 3rd parties, then you will need to check if you have included code which is under the AGPL or similar licenses.
For the frontend server you have to consider 2 separate cases: a) code which only runs on the server; and b) code which is sent to the browser of the client.
For a) similar considerations apply as for the backend server.