iview-project icon indicating copy to clipboard operation
iview-project copied to clipboard

npm run init 报错

Open newbaner opened this issue 5 years ago • 10 comments

[email protected] 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! [email protected] init: webpack --progress --config webpack.dev.config.js npm ERR! Exit status 1

newbaner avatar Dec 10 '18 09:12 newbaner

+1 I guess iView is abandoned?

davidmoshal avatar Dec 18 '18 02:12 davidmoshal

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) {});

newbaner avatar Dec 18 '18 02:12 newbaner

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.

chinatreeqy avatar Dec 18 '18 05:12 chinatreeqy

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!

weberbo avatar Jan 24 '19 08:01 weberbo

@newbaner It works, Thx!

fisher-monkey avatar Jan 25 '19 05:01 fisher-monkey

it s right zeze

roronoaxyz avatar Feb 03 '19 08:02 roronoaxyz

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

ace1573 avatar Feb 12 '19 07:02 ace1573

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.

hiroban avatar Mar 07 '19 05:03 hiroban

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 ~.~

wsyxl365 avatar Apr 08 '19 03:04 wsyxl365

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~

jmliu1983 avatar Oct 22 '19 01:10 jmliu1983