Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
40 views

i just discovered that Heroku uses an Ephemeral File System, so i opted to use AWS S3 to store images and upload them. the problem i encountered is creating the file to upload it. my app is built with ...
Ouchou Ayoub's user avatar
0 votes
1 answer
517 views

while working on the local host, api and the posts.jaon file also works fine. was able to perform CRUD.But after I deploy it to vercel, the api does not loads. error in the log is something like this: ...
daljeet singh's user avatar
0 votes
0 answers
68 views

I have this code: circular = () => { //fix circular stuff for json.stringify seen = new WeakSet(); return (key, value) => { if (typeof value === 'object' && value !== null) { ...
Cain Nuke's user avatar
  • 3,145
0 votes
1 answer
31 views

A way to filter out those directories which need administration permission. fs.readdirSync(currentPath, { withFileTypes: true }).forEach(element => { .... }) Still shows all directories. Even ...
Bugger's user avatar
  • 1
0 votes
2 answers
166 views

The assignment I'm working on is to design a Node.js program that presents the user with command line prompts and writes a well-organized README markdown file with the input. The prompts are created ...
Sam Tomaka's user avatar
0 votes
2 answers
121 views

I have multer as middleware before editing user function. The thing is that multer uploads photo no matter what, so I am wondering if there is a way to somehow cancel upload if e.g. email is invalid. ...
milan.dzeki's user avatar
0 votes
0 answers
29 views

Is there a reason why this code doesn't work? additionally using node file.js responds MODULE_NOT_FOUND. const fs = require('fs'); // Create the "text.txt" file with the content "hello ...
user avatar
0 votes
1 answer
950 views

It is my understanding that the core modules, like "fs" are part of the node.js build, and no special configuration is needed to make them available for importing, so I'm at a loss as to how ...
kelly's user avatar
  • 33
0 votes
1 answer
791 views

I am trying to run the following code: const uploadParams = {Bucket: bucketName, Key: '', Body: ''}; const file = '/home/a/bars/img1.png'; const fileStream = fs.createReadStream(file); fileStream.on('...
best_of_man's user avatar
1 vote
3 answers
7k views

I want to creat directory if not exist and then save the file that I got from Front-end This is my code and it only does the part of creating folders, but my main problem is saving the file in this ...
Sepehr Asghari's user avatar
1 vote
2 answers
7k views

I'm trying to scan a local directory for all of the text files within it, then read each of those files. I want to do it properly using promises, async, and await, but something is going wrong and am ...
david's user avatar
  • 273
0 votes
1 answer
147 views

I have a typescript project using winston and winston-daily-rotate-file. At the start of the project I check for environment variables that are present. If not, I want to log the missing variable ...
HotFix's user avatar
  • 336
0 votes
1 answer
81 views

I have an electron app on Mac with full disk permissions. I am using fs to make a directory in a protected folder, and copy files from a temp folder to the new directory. When using fs.copy, I ...
leuenn's user avatar
  • 11
1 vote
0 answers
51 views

I use XMLHttpRequest in Node.js and when handling request in server.js (asynchronous POST request) I use this code: const filePath = './input.pdf'; fsPromises.readFile(filePath) ....
Vladimir Shestakov's user avatar
0 votes
1 answer
38 views

I am trying to load json data for a small project of mine, but when I run loadDefs (the function meant to save the data to the Game class) it seems to run fs.readFile before checking wether file_data ...
MisterZig's user avatar
1 vote
0 answers
27 views

I'm a total beginner with backend, node and express I'm trying to build an api that resize the image according to the entered params in the URL and render it in the browser using typeScript, so I'm ...
Ahmed Saeed's user avatar
2 votes
1 answer
270 views

I have a requirement to process a file in node to extract some text from that file, my issue is since i am new to node, i don't understand how to pass the path to the file. I am using cloud Function ...
user avatar
0 votes
1 answer
517 views

I have a program that writes a lot of files very quickly, and I noticed that sometimes there will be extra brackets or text in json files sometimes. Here is how the program works: There is an array of ...
floober's user avatar
  • 23
0 votes
0 answers
133 views

I'm still new to NodeJS and am getting a MaxListenersExceededWarning: Possible EventEmitter memory leak detected message when I call the following function: function zipUpFile() { const folderPath = ...
RenaissanceMan's user avatar
0 votes
0 answers
117 views

I have an app that I want build as an Electron app (using electron-builder) or build for deployment to a web server. With the Electron app, I have the app (from inside the Electron renderer) read and ...
Jim's user avatar
  • 676
1 vote
0 answers
517 views

My project has above project structure src ---- Clone(empty folder) ---- app.module.ts ---- app.service.ts serverless functions: main: timeout: 60 handler: src/...
JaNith RathNayaka's user avatar
0 votes
2 answers
480 views

I'm a beginner to node.js, started to learn just a few days ago. i'm trying to log the listener's data into a new file by using fs.appendFile, but no matter how many times i try to change the code, it ...
eggyolk's user avatar
0 votes
0 answers
293 views

I am trying to read the .dmp file using nodejs Filesystem but it is not working. Can someone please help me fs = require('fs') fs.readFile('test.dmp', 'utf8', function (err,data) { if (err) { ...
Neha's user avatar
  • 15
1 vote
1 answer
570 views

I have the following code: console.log(fs.readdirSync(__dirname)); Which prints out the following: [ 'index.js', 'objective.js', 'quest.js', 'user_objective.js' ] However, my file directory setup is ...
Snoopy's user avatar
  • 1,377
0 votes
1 answer
91 views

I'm setting up an https server but as soon as I access the root / the service crashes (after retrieving the html file successfully). The error is generated as per the debugger in the fs.readFile ...
Alberto's user avatar
  • 13

1
3 4
5
6 7
64