错误:EACCES:权限被拒绝,Catalina NodeJS中的mkdir'/ root'

时间:2019-11-12 10:29:06

标签: node.js macos permissions macos-catalina

当我尝试在MacOS Catalina上使用命令节点start.js运行我的Nodejs项目时,出现此错误。 start.js是文件名。直到上周,它一直运行良好。现在,我无法完成我的项目。我很确定这是由于Catalina的权限问题引起的,但我无法修复它。

/Users/bharathrajkumar/Desktop/Eventsprint%20Core%20API/node_modules/mkdirp/index.js:90
                    throw err0;
                    ^

Error: EACCES: permission denied, mkdir '/root'
    at Object.mkdirSync (fs.js:757:3)
    at sync (/Users/bharathrajkumar/Desktop/Eventsprint%20Core%20API/node_modules/mkdirp/index.js:71:13)
    at Function.sync (/Users/bharathrajkumar/Desktop/Eventsprint%20Core%20API/node_modules/mkdirp/index.js:77:24)
    at DateRollingFileStream.BaseRollingFileStream.openTheStream (/Users/bharathrajkumar/Desktop/Eventsprint%20Core%20API/node_modules/streamroller/lib/BaseRollingFileStream.js:79:10)
    at DateRollingFileStream.BaseRollingFileStream (/Users/bharathrajkumar/Desktop/Eventsprint%20Core%20API/node_modules/streamroller/lib/BaseRollingFileStream.js:41:8)
    at new DateRollingFileStream (/Users/bharathrajkumar/Desktop/Eventsprint%20Core%20API/node_modules/streamroller/lib/DateRollingFileStream.js:44:32)
    at appender (/Users/bharathrajkumar/Desktop/Eventsprint%20Core%20API/node_modules/log4js/lib/appenders/dateFile.js:23:19)
    at Object.configure (/Users/bharathrajkumar/Desktop/Eventsprint%20Core%20API/node_modules/log4js/lib/appenders/dateFile.js:53:10)
    at clustering.onlyOnMaster (/Users/bharathrajkumar/Desktop/Eventsprint%20Core%20API/node_modules/log4js/lib/appenders/index.js:59:27)
    at Object.onlyOnMaster (/Users/bharathrajkumar/Desktop/Eventsprint%20Core%20API/node_modules/log4js/lib/clustering.js:74:50)
    at createAppender (/Users/bharathrajkumar/Desktop/Eventsprint%20Core%20API/node_modules/log4js/lib/appenders/index.js:57:21)
    at Object.keys.forEach (/Users/bharathrajkumar/Desktop/Eventsprint%20Core%20API/node_modules/log4js/lib/appenders/index.js:73:25)
    at Array.forEach (<anonymous>)
    at setup (/Users/bharathrajkumar/Desktop/Eventsprint%20Core%20API/node_modules/log4js/lib/appenders/index.js:71:33)
    at listeners.forEach.listener (/Users/bharathrajkumar/Desktop/Eventsprint%20Core%20API/node_modules/log4js/lib/configuration.js:36:33)
    at Array.forEach (<anonymous>)
    at Object.configure (/Users/bharathrajkumar/Desktop/Eventsprint%20Core%20API/node_modules/log4js/lib/configuration.js:36:13)
    at Object.configure (/Users/bharathrajkumar/Desktop/Eventsprint%20Core%20API/node_modules/log4js/lib/log4js.js:62:17)
    at Object.<anonymous> (/Users/bharathrajkumar/Desktop/Eventsprint%20Core%20API/utils/log4js.js:109:8)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Module._compile (/Users/bharathrajkumar/Desktop/Eventsprint%20Core%20API/node_modules/pirates/lib/index.js:99:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:789:10)

0 个答案:

没有答案