webpack安装异常

webpack中文指南:https://zhaoda.net/webpack-handbook/index.html

今天中午,我用   cnpm install   重新下载了一下项目的依赖,爆了一个错误如下:

peerDependencies link [email protected] in D:\work-span\travel\Travel\node_modules\[email protected]@ajv-keywords unmet with D:\work-span\travel\Travel\node_modules\ajv(6.6.2)
peerDependencies WARNING webpack-dev-server@^3.1.14 requires a peer of webpack@^4.0.0 but [email protected] was installed
peerDependencies WARNING webpack-cli@^3.1.2 requires a peer of webpack@^4.x.x but [email protected] was installed
peerDependencies WARNING webpack[email protected][email protected] requires a peer of webpack@^4.0.0 but [email protected] was installed
deprecate autoprefixer@7.2.6 › browserslist@^2.11.3 Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
deprecate css[email protected][email protected][email protected] › browserslist@^1.7.6 Browserslist 2
could fail on reading Browserslist >3.0 config used in other tools.
deprecate eslint@4.19.1 › [email protected][email protected] › circular-json@^0.3.1 CircularJSON
is in maintenance only, flatted is its successor.
deprecate webpack[email protected] › bfj-node4@^5.2.0 Switch to the `bfj` package for fixes and new features!
Recently updated (since 2018-12-18): 9 packages (detail see file D:\work-span\travel\Travel\node_modules\.recently_updates.txt)
√ All packages installed (928 packages installed from npm registry, used 38s(network 37s), speed 529.19
kB/s, json 802(1.72MB), tarball 17.22MB)

我仔细查了一下,原来是webpack-dev-server需要webpack  4.0.0以上版本的支持,但是我的webpack才是3.12.0版本,版本不够。

果断拆卸

//全局拆卸webpack  

npm uninstall webpack -g

然后

//全局安装webpack
$ npm install webpack -g


//因为webpack版本问题最好安装现目前的稳定版
$ npm install [email protected] --save-dev

 

显示如下

 

难道又出错了。网上查看一番。我去,原来不是我的锅;

出现这样的原因是: fsevent是mac osx系统的,在win或者Linux下使用了 所以会有警告,忽略即可。

转载于:https://www.cnblogs.com/clwydjgs/p/10174622.html

你可能感兴趣的:(webpack安装异常)