webpack.validateSchema不是一个函数 [英] webpack.validateSchema is not a function
问题描述
Webpack突然抛出这个错误:
Webpack are throwing this error all of a sudden:
TypeError:webpack.validateSchema不是函数
TypeError: webpack.validateSchema is not a function
星期五一切都很好,今天不工作。自周五以来没有新的提交要掌握。
Everything was working fine Friday, not working today. No new commits to master since Friday.
修剪的NPM,没有用,删除了NPM文件夹并重新安装,没有骰子。检查了以前的分支机构,这些分支机构已经过了一个多星期没有从Master那里重新定位。还是一样。
Pruned NPM, that didn't work, deleted NPM folder and re-installed, no dice. Checked out to previous branches which have not been rebased from Master for over a week. Still the same.
任何人有想法吗?
推荐答案
看起来喜欢npm bug,因为 webpack-dev-server@2.1.0-beta.11
需要 webpack@^2.1.0-beta.26
但是npm无法安装它。
Looks like npm bug, since webpack-dev-server@2.1.0-beta.11
requires webpack@^2.1.0-beta.26
but npm failed to install it.
避免问题而不更新太多的最简单方法是将package.json中的依赖项更改为
The easiest way to avoid the issue without updating too much is to change dependency in package.json to
"webpack-dev-server": "2.1.0-beta.10",
而不是像
"webpack-dev-server": "^2.1.0-beta.9",
^char之前的版本说兼容。删除它完全符合版本。
"^" char before version says "compatible with". Removing it sticks to the version exactly.
不要忘记运行 npm install
或 npm update
之后。
这篇关于webpack.validateSchema不是一个函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!