Skip to content

Tag: node.js

Node.js – Asynchronously edit JSON file and prevent interferance from other async calls

I am making a Discord bot in node.js, and need to store some per-guild data. I want to store it in separate JSON files in data/<>.json using the built in fs/promises. I have a function setGuildData(guildID: string, dataToAssign: object) that reads the current JSON file, parses the JSON to fileData, then assigns the new data using Object.assign() to finally stringify

npm ERR! code EACCES´╝î npm install –global yarn met error

Mac mini (M1, 2020) Monterey Brownie v1.17.2 nodejs v16.13.4 I am learning solidity according to reference( Node.JS install is fine when I tried this the terminal give the error information I checked the owner of the file ,the owner is root ,should i use sudo? find this thread (Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’),changed the owner , stll one file

Can’t connect to a MongoDB server

I’m trying to deploy this Fullstack app to a DigitalOcean droplet: I installed MongoDB like how to documentation said and then I started it and didn’t do anything else (I don’t know if I need to actually make a database or not this is the first time I’m using MongoDB). Then I cloned the repo, then I installed NPM

Failed to commit transaction (conflicting files) when updating packages on Manjaro [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question