iview / iview-project

This project is build for Vue.js 2 + vue-router + webpack2 + iView 3
MIT License
839 stars 389 forks source link

npm run dev 报错 npm run init也报错 #80

Open SenvenStudent opened 5 years ago

SenvenStudent commented 5 years ago

npm run dev 报错 npm run init也报错

nowind commented 5 years ago

10+的nodejs对fs.write的回调函数改为必选,且第二个参数有string和buffer区分,而两个不同的参数导致参数个数不同,string的情况回调在第六个参数,buffer则是在第7个参数,虽然变量名字叫buffer,但是是string的。。改成Buffer.from(string)

DuYueYu commented 5 years ago

看好报错的文件位置,整句替换为: fs.write(fd, buf, 0, 'utf-8', function(err, written, buffer) {}); 确实是node版本的问题,也可以选择降低版本

laozhujia commented 5 years ago

就这么放着bug,没人维护了呀

SenvenStudent commented 5 years ago

就这么放着bug,没人维护了呀

DuYueYu的好像是解决方案,没试过,有空了我试试