Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file.js报错 #13

Open
bladeyon opened this issue May 10, 2017 · 2 comments
Open

file.js报错 #13

bladeyon opened this issue May 10, 2017 · 2 comments

Comments

@bladeyon
Copy link

bladeyon commented May 10, 2017

NodeSample\utils\file.js文件第20行,报path.existsSync()函数undefined。查询官方path API,没有此函数,后发现在fs模块中有此函数,修改后运行通过。初学者其他还在摸索中……

@bladeyon bladeyon changed the title file.js file.js报错 May 10, 2017
@bladeyon
Copy link
Author

NodeSample\controllers\fileSystem.js 第26行也是同样的问题

@sss4999
Copy link

sss4999 commented May 10, 2017

var root=__dirname;
var res =path.parse(root);
if(!res){
util.error(root+"文件夹不存在,请重新制定根文件夹!");
process.exit();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants