How to cut the files in viewsdev/node_modules, including node_modules, to another directory
const path = require('path');
const fs = require('fs');
let modules = path.join(__dirname,'viewsdev/node_modules');
let newModules = path.resolve(__dirname,'../../../node_modules');
fs.rename(modules,newModules,function(err){
if(err){
console.log(err)
}
})
Using fs.rename will report the error EPERM: operation not permitted node
Is it a permissions issue