安装npm时出现以下错误:
npm WARN worker-loader@0.8.1需要webpack同伴@> = 0.9< 2 || ^ 2.1.0-beta || ^ 2.2.0但没有安装。
npm WARN可选SKIPPING OPTIONAL DEPENDENCY:fsevents@1.1.2(node_modules \ fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY:不支持的fsevents@1.1.2平台:想要{“os”:“darwin”,“arch”:“any”}(当前:{“os”:“win32”,“拱 “:” 64" })**
这是我的package.json
:
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies":
{
"axios": "^0.16.2",
"bootstrap-sass": "^3.3.7",
"cross-env": "^5.0.1",
"jquery": "^3.1.1",
"laravel-mix": "^1.0",
"lodash": "^4.17.4",
"vue": "^2.1.10"
},
"dependencies": {
"latest-version": "^3.1.0",
"pdfjs-dist": "^1.9.528"
}
}
版本:Windows 10,Node v8.4.0,Npm 5.3.0,Laravel:4.4。
答案 0 :(得分:0)
首先,这些只是警告,而不是错误 - 你没有破坏任何东西!
那就是说,这就是他们背后的原因。
worker-loader
希望Webpack 2与它一起安装。 Laravel Mix使用Webpack 3,因此您会收到警告。也就是说,它不应该导致任何问题 - worker-loader
支持Webpack 3,they just haven't updated the peer dependency to reflect that yet。fsevents
库,它是许多软件包的Mac可选依赖项,无法安装在您的库中Windows机器。