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 init 报错 #67

Open newbaner opened 5 years ago

newbaner commented 5 years ago

iview-project@3.0.0 init D:\projects\vue\iview-project webpack --progress --config webpack.dev.config.js

0% compilingfs.js:129 throw new ERR_INVALID_CALLBACK(); ^

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function at maybeCallback (fs.js:129:9) at Object.write (fs.js:533:14) at D:\projects\vue\iview-project\webpack.dev.config.js:10:8 at FSReqWrap.oncomplete (fs.js:141:20) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! iview-project@3.0.0 init: webpack --progress --config webpack.dev.config.js npm ERR! Exit status 1

davidmoshal commented 5 years ago

+1 I guess iView is abandoned?

newbaner commented 5 years ago

I solved it!You can try the following method: "webpack.dev.config.js" replace fs.write(fd, buf, 0, buf.length, 0, function (err, written, buffer){}); with fs.write(fd, buf, function(err, written, buffer) {});

chinatreeqy commented 5 years ago

I solved it!You can try the following method: "webpack.dev.config.js" replace fs.write(fd, buf, 0, buf.length, 0, function (err, written, buffer){}); with fs.write(fd, buf, function(err, written, buffer) {});

yes,it's very useful!! thank you.

weberbo commented 5 years ago

I solved it!You can try the following method: "webpack.dev.config.js" replace fs.write(fd, buf, 0, buf.length, 0, function (err, written, buffer){}); with fs.write(fd, buf, function(err, written, buffer) {});

Thx!

fisher-monkey commented 5 years ago

@newbaner It works, Thx!

roronoaxyz commented 5 years ago

it s right zeze

ace1573 commented 5 years ago

I solved it!You can try the following method: "webpack.dev.config.js" replace fs.write(fd, buf, 0, buf.length, 0, function (err, written, buffer){}); with fs.write(fd, buf, function(err, written, buffer) {});

good job

hiroban commented 5 years ago

You also do like this: file: webpack.dev.config.js change: fs.write(fd, buf, 0, buf.length, 0, function(err, written, buffer) {}); to fs.write(fd, buf, 0, 'utf-8', function(err, written, buffer) {});

Function fs.write with Node v10+ callback must be.

wsyxl365 commented 5 years ago

I solved it!You can try the following method: "webpack.dev.config.js" replace fs.write(fd, buf, 0, buf.length, 0, function (err, written, buffer){}); with fs.write(fd, buf, function(err, written, buffer) {});

good job man ! thanks ~.~

jmliu1983 commented 5 years ago

I solved it!You can try the following method: "webpack.dev.config.js" replace fs.write(fd, buf, 0, buf.length, 0, function (err, written, buffer){}); with fs.write(fd, buf, function(err, written, buffer) {});

Thanks~