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

npm run init 报错 #67

Open
newbaner opened this issue Dec 10, 2018 · 10 comments
Open

npm run init 报错 #67

newbaner opened this issue Dec 10, 2018 · 10 comments

Comments

@newbaner
Copy link

[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

@davidmoshal
Copy link

+1
I guess iView is abandoned?

@newbaner
Copy link
Author

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
Copy link

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
Copy link

weberbo commented Jan 24, 2019

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
Copy link

@newbaner
It works, Thx!

@roronoaxyz
Copy link

it s right zeze

@ace1573
Copy link

ace1573 commented Feb 12, 2019

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
Copy link

hiroban commented Mar 7, 2019

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
Copy link

wsyxl365 commented Apr 8, 2019

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
Copy link

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~

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

10 participants