skip to Main Content

Javascript – EISDIR: illegal operation on a directory, when trying to copy one file to another directory using fs

Im trying to copy one of my files from one directory into another directory .then((answers) => { //installing dependencies in specified directory try{ console.log(answers.dependencies) //answers.dependencies let dest = "/Users/[name]/Code/test" let copyingFile = fs.copyFile('/Users/[name]/Code/boilerplate/EZBOILERPLATE/testFile.js', "/Users/[name]/Code/test") } catch(error) { console.log("Error when copying…

VIEW QUESTION

Put requests using node.js and mongodb

I'm learning how to make requests using node.js. My problem is that it generates these errors when making the requests (Cannot GET /Citaup/654fe24584f7a3d27e0a4c61) Failed to load resource: the server responded with a status of 404 (Not Found) Registro.js:146 Error: Error…

VIEW QUESTION

Html – Not connecting to mongo db

var express = require('express'); var router = express.Router(); const MongoClient = require('mongodb').MongoClient; /* GET home page. */ router.get('/', function (req, res, next) { res.render('index', { title: 'Express' }); }); router.post("/signup", function (req, res) { console.log("first_name: " + req.body.first_name) console.log("last_name: "…

VIEW QUESTION
Back To Top
Search