nodejs
nodejs copied to clipboard
file.js报错
NodeSample\utils\file.js文件第20行,报path.existsSync()函数undefined。查询官方path API,没有此函数,后发现在fs模块中有此函数,修改后运行通过。初学者其他还在摸索中……
NodeSample\controllers\fileSystem.js 第26行也是同样的问题
var root=__dirname; var res =path.parse(root); if(!res){ util.error(root+"文件夹不存在,请重新制定根文件夹!"); process.exit(); }