iview / iview/iview-cli

npm run dev 报错,不太懂webpack,请大神帮忙解决。

Open
#44 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
721
Forks
139
PR merge metrics
No merged PRs in 30d

Description

npm run dev

> @1.0.0 dev /Users/atom/Workspace/iview
> webpack-dev-server --content-base ./ --open --inline --hot --compress --history-api-fallback --config webpack.dev.config.js

fs.js:157
throw new ERR_INVALID_CALLBACK();
^

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at maybeCallback (fs.js:157:9)
at Object.fs.write (fs.js:674:14)
at /Users/atom/Workspace/iview/webpack.dev.config.js:10:8
at FSReqWrap.oncomplete (fs.js:169:20)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @1.0.0 dev: `webpack-dev-server --content-base ./ --open --inline --hot --compress --history-api-fallback --config webpack.dev.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/atom/.npm/_logs/2018-05-29T01_29_12_570Z-debug.log

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with webpack.dev.config.js at line 10, where the stack trace reports fs.write failing, and reproduce the issue with npm run dev. Check the relevant Node.js fs API usage and confirm that the development server starts without ERR_INVALID_CALLBACK.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
build-system, cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.