3
votes

I get the following errors while installing npm:

npm WARN [email protected] requires a peer of webpack@>=0.9 <2 || ^2.1.0-beta || ^2.2.0 but none was installed.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})**

Here is my 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"
    }
}

Versions: Windows 10, Node v8.4.0, Npm 5.3.0, Laravel: 4.4.

1
Those are warnings, you can ignore it. Npm modules will continue to work unless there are ERRORs.shyammakwana.me

1 Answers

0
votes

Firstly, these are just warnings, not errors - you've not broken anything!

That said, here's the reasoning behind them.

  • The first warning is telling you that worker-loader expects Webpack 2 to be installed alongside it. Laravel Mix uses Webpack 3, so you get a warning. That said, it shouldn't cause you any problems - worker-loader supports Webpack 3, they just haven't updated the peer dependency to reflect that yet.
  • The other warnings are very common - they're just telling you that the fsevents library, which is a Mac-only optional dependency of a lot of packages, couldn't be installed on your Windows machine.