WebpackNotifierPlugin внезапно выдает ошибку EACCES

Я нахожусь на macOS Sierra и начал получать эту ошибку в моем проекте, и, насколько я знаю или ничего не могу сказать, в проекте ничего не изменилось.

16236ms building modules
4ms sealing
0ms optimizing
0ms basic module optimization
1ms module optimization
10ms advanced module optimization
3ms basic chunk optimization
0ms chunk optimization
0ms advanced chunk optimization
1ms module and chunk tree optimization
0ms chunk modules optimization
0ms advanced chunk modules optimization
2ms module reviving
2ms module order optimization
3ms module id optimization
2ms chunk reviving
0ms chunk order optimization
7ms chunk id optimization
15ms hashing
4ms module assets processing
306ms chunk assets processing
16ms additional chunk assets processing
0ms recording
0ms additional asset processing
0ms chunk asset optimization
 94% asset optimization
[at-loader] Checking started in a separate process...
120ms asset optimization
 95% emittingError: spawn EACCES
    at _errnoException (util.js:1041:11)
    at ChildProcess.spawn (internal/child_process.js:325:11)
    at exports.spawn (child_process.js:493:9)
    at Object.exports.execFile (child_process.js:208:15)
    at Object.module.exports.fileCommand (/Users/chris/code/foobar-info-map/node_modules/node-notifier/lib/utils.js:53:13)
    at NotificationCenter.notify (/Users/chris/code/foobar-info-map/node_modules/node-notifier/notifiers/notificationcenter.js:66:11)
    at module.exports.WebpackNotifierPlugin.compilationDone (/Users/chris/code/foobar-info-map/node_modules/webpack-notifier/index.js:62:18)
    at Compiler.applyPlugins (/Users/chris/code/foobar-info-map/node_modules/tapable/lib/Tapable.js:61:14)
    at Watching._done (/Users/chris/code/foobar-info-map/node_modules/webpack/lib/Compiler.js:104:17)
    at compiler.emitRecords.err (/Users/chris/code/foobar-info-map/node_modules/webpack/lib/Compiler.js:78:19)
    at Compiler.emitRecords (/Users/chris/code/foobar-info-map/node_modules/webpack/lib/Compiler.js:375:38)
    at compiler.emitAssets.err (/Users/chris/code/foobar-info-map/node_modules/webpack/lib/Compiler.js:61:20)
    at applyPluginsAsyncSeries1.err (/Users/chris/code/foobar-info-map/node_modules/webpack/lib/Compiler.js:368:12)
    at next (/Users/chris/code/foobar-info-map/node_modules/tapable/lib/Tapable.js:218:11)
    at Compiler.afterEmit (/Users/chris/code/foobar-info-map/node_modules/stylelint-webpack-plugin/lib/run-compilation.js:52:5)
    at next (/Users/chris/code/foobar-info-map/node_modules/tapable/lib/Tapable.js:220:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! foobar-info-map@0.1.0 dev: `webpack-dev-server --env=dev --progress --profile --colors --watch --hot --open`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the foobar-info-map@0.1.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Я закомментировал WebpackNotifierPlugin в своих плагинах, и он, похоже, исчез. Я могу оставить это, но было бы неплохо выяснить, как / почему это произошло, и могу ли я это исправить.

webpack.common.js:

'use strict';

const webpack                                 = require('webpack');
const HtmlWebpackPlugin                       = require('html-webpack-plugin');
const CommonsChunkPlugin                      = webpack.optimize.CommonsChunkPlugin;
const CleanWebpackPlugin                      = require('clean-webpack-plugin');
const StyleLintPlugin                         = require('stylelint-webpack-plugin');
const WebpackNotifierPlugin                   = require('webpack-notifier');
const { CheckerPlugin, TsConfigPathsPlugin }  = require('awesome-typescript-loader');

// All external config components
const entry             = require('./webpack-configs/entry')(__dirname);
const output            = require('./webpack-configs/output')(__dirname);
const resolve           = require('./webpack-configs/resolve')(__dirname);
const eslintLoader      = require('./webpack-configs/loaders/eslint')(__dirname);
const tslintLoader      = require('./webpack-configs/loaders/tslint')(__dirname);
const sourceMapLoader   = require('./webpack-configs/loaders/sourcemap')(__dirname);
const babelLoader       = require('./webpack-configs/loaders/babel')(__dirname);
const typescriptLoader  = require('./webpack-configs/loaders/typescript')(__dirname);
const assetLoader       = require('./webpack-configs/loaders/assets')(__dirname);
const htmlLoader        = require('./webpack-configs/loaders/html')(__dirname);
const cssLoader         = require('./webpack-configs/loaders/css')(__dirname);
const sassLoader        = require('./webpack-configs/loaders/sass')(__dirname);

module.exports = {
  cache: true,
  entry,
  output,
  resolve,
  module: {

    // WebPack loader configuration, runs from bottom to top
    rules: [
      eslintLoader,
      tslintLoader,
      sourceMapLoader,
      babelLoader,
      typescriptLoader,
      assetLoader,
      htmlLoader,
      cssLoader,
      sassLoader
    ],
    noParse: /(mapbox-gl)\.js$/,
  },

  // WebPack plugin configuration
  plugins: [

    // NamedModulesPlugin provides names of module files in debug, rather than generated Ids
    new webpack.NamedModulesPlugin(),

    // WebpackNotifierPlugin provides a desktop toast/popup with information about build process and errors
    // new WebpackNotifierPlugin(),

    // TsConfigPathsPlugin is an Awesome-Typescript-Loader plugin to support the paths options in tsconfig.json
    // TODO: Break out related plugins and loaders (TypeScript loader)
    new TsConfigPathsPlugin(),

    // CheckerPlugin is an Awesome-Typescript-Loader plugin to fork the type checking to a separate thread
    // TODO: Break out related plugins and loaders (TypeScript loader)
    new CheckerPlugin(),

    // StyleLintPlugin will lint all styles, uses a plugin (to run on all files)
    //   instead of a loader (only runs on imported/included files)
    //   see .stylelintrc  for configuration
    //   Run on .scss and .sass files in the client folder and any sub-folders
    new StyleLintPlugin({
      files: ['./client/**/*.s?(a|c)ss'],
      emitErrors: false
    }),

    // Module scope hoisting, use a common IIFE instead of creating a new one for each module, ES6 modules only
    // Improves JavaScript execution speed in the browser, but takes a little longer to compile
    //   Commented-out because it doesn't seem to work right with 'reflect-metadata' (dependency injection) yet
    // new webpack.optimize.ModuleConcatenationPlugin(),

    // CleanWebpackPlugin deletes the dist folder before build
    new CleanWebpackPlugin(['dist']),

    // CommonsChunkPlugin will separate any includes from the node_modules folder to its own .js bundle
    new CommonsChunkPlugin({
      // Name of the bundle (vendor.js)
      name: 'vendor',

      // Only analyze the app entry point, we don't want to change the others
      chunks: ['app'],

      // Check if module name is a string and is in node_modules
      minChunks: (module) => typeof module.userRequest === 'string' && /node_modules/.test(module.userRequest.split('!').pop())
    }),

    // HtmlWebpackPlugin injects scripts and styles into the index.html
    new HtmlWebpackPlugin({
      // Load the _index.html template
      template: 'client/_index.html',

      // Output as index.html
      filename: 'index.html',

      // Sort the chunks (bundles) so they are loaded in the right order (borrowed from the ng2 seed)
      chunksSortMode: (left, right) => {
        // Order of bundles to inject into index.html (borrowed from the ng2 seed)
        //   We want polyfills to load before anything else
        //   Then Styles to load (if bundled in .js and not external as .css files)
        //   Then the Vendor Common Chunk (see CommonsChunkPlugin above)
        //   Then our App code last
        const entryPoints = ['inline', 'polyfills', 'sw-register', 'styles', 'vendor', 'app'];

        const leftIndex = entryPoints.indexOf(left.names[0]);
        const rightIndex = entryPoints.indexOf(right.names[0]);
        if (leftIndex > rightIndex) {
          return 1;
        } else if (leftIndex < rightIndex) {
          return -1;
        } else {
          return 0;
        }
      }
    }),

    // HtmlWebpackScriptPathAdjustPlugin prepends Script paths with the passed string
    // new HtmlWebpackScriptPathAdjustPlugin({ prependStr: '.' })
  ]
};

webpack.dev.js:

'use strict';

const webpack       = require('webpack');
const Merge         = require('webpack-merge');
const CommonConfig  = require('./webpack.common.js');

// https://webpack.js.org/guides/production-build/
module.exports = (env) => {
  return Merge(CommonConfig, {
    // https://webpack.js.org/configuration/devtool/#devtool
    devtool: 'cheap-module-eval-source-map',
    plugins: [
      // LoaderOptionsPlugin to provide backwards compatibility with older plugins and loaders
      new webpack.LoaderOptionsPlugin({
        // Cache whenever possible
        cache: true,
        // Display debug information
        debug: true,
        // Don't minify anything
        minimize: false
      }),
      new webpack.DefinePlugin({
        'process.env': {
          'NODE_ENV': JSON.stringify('development')
        }
      })
    ],
    // WebPack Dev Server configuration
    devServer: {
      host: '0.0.0.0',
      port: 9000,
      // If a WebPack tracked file can't be found, serve it from the client directory
      // (will have to setup a copy plugin for a dist build)
      // contentBase: './client',
      // Allow paths and file names that don't exist to serve the index.html file (for HTML5 style URL and history)
      historyApiFallback: true,
      // Don't compress or minify the index.html
      compress: false,
      // Use Hot Module Reloading
      hot: true,
      // Inline our Hot Module Reloading code (otherwise serves it at a separate port)
      inline: true,
      // Only show minimal stats unless there is an error or is a first build
      // stats: 'minimal'
    }
  });
};

package.json:

"devDependencies": {
  "@types/autoprefixer": "~6.7.2",
  "@types/babel-core": "~6.25.1",
  "@types/body-parser": "~1.16.5",
  "@types/copy-webpack-plugin": "~4.0.1",
  "@types/express": "~4.0.37",
  "@types/extract-text-webpack-plugin": "~2.1.0",
  "@types/gsap": "~1.19.1",
  "@types/html-webpack-plugin": "~2.28.0",
  "@types/iscroll": "~5.2.1",
  "@types/mapbox-gl": "~0.39.4",
  "@types/node": "~8.0.25",
  "@types/node-sass": "~3.10.32",
  "@types/npm": "~2.0.29",
  "@types/reflect-metadata": "~0.0.5",
  "@types/stylelint": "~7.10.0",
  "@types/webpack": "~3.0.10",
  "@types/webpack-dev-server": "~2.4.1",
  "@types/webpack-merge": "~0.0.5",
  "@types/webpack-notifier": "~1.5.1",
  "autoprefixer": "~7.1.3",
  "awesome-typescript-loader": "~3.2.3",
  "babel-core": "~6.26.0",
  "babel-loader": "~7.1.2",
  "babel-preset-env": "~1.6.0",
  "babel-preset-stage-0": "~6.24.1",
  "browserslist": "~2.4.0",
  "clean-webpack-plugin": "~0.1.16",
  "copy-webpack-plugin": "~4.0.1",
  "css-loader": "~0.28.5",
  "eslint": "~4.5.0",
  "eslint-config-standard": "~10.2.1",
  "eslint-loader": "~1.9.0",
  "eslint-plugin-import": "~2.7.0",
  "eslint-plugin-node": "~5.1.1",
  "eslint-plugin-promise": "~3.5.0",
  "eslint-plugin-standard": "~3.0.1",
  "extract-loader": "~1.0.1",
  "extract-text-webpack-plugin": "~3.0.0",
  "file-loader": "~0.11.2",
  "gsap": "~1.20.2",
  "html-loader": "~0.5.1",
  "html-webpack-plugin": "~2.30.1",
  "foobar-core-web": "git+ssh://git@gitlab.foobarxg.com/prototyping/foobar-core-web.git#v1.1.0",
  "node-sass": "~4.5.3",
  "postcss-loader": "~2.0.6",
  "raw-loader": "~0.5.1",
  "resolve-url-loader": "~2.1.0",
  "sass-loader": "~6.0.6",
  "source-map-loader": "~0.2.1",
  "style-loader": "~0.18.2",
  "stylelint": "~8.0.0",
  "stylelint-config-standard": "~17.0.0",
  "stylelint-webpack-plugin": "~0.9.0",
  "tslint": "~5.7.0",
  "tslint-config-standard": "~6.0.1",
  "tslint-eslint-rules": "~4.1.1",
  "tslint-loader": "~3.5.3",
  "typescript": "~2.4.2",
  "uglifyjs-webpack-plugin": "~1.0.0-beta.2",
  "url-loader": "~0.5.9",
  "vue-class-component": "~5.0.2",
  "vue-property-decorator": "~5.2.1",
  "vue-template-compiler": "~2.4.2",
  "vue-template-loader": "~0.3.1",
  "webpack": "~3.5.5",
  "webpack-dev-server": "~2.7.1",
  "webpack-merge": "~4.1.0",
  "webpack-notifier": "~1.5.0"
},
"dependencies": {
  "babel-polyfill": "~6.26.0",
  "body-parser": "~1.17.2",
  "express": "~4.15.4",
  "http-server": "~0.10.0",
  "inversify": "~4.3.0",
  "iscroll": "~5.2.0",
  "mapbox-gl": "~0.39.1",
  "reflect-metadata": "~0.1.10",
  "tslib": "~1.7.1",
  "vue": "~2.4.2",
  "vue-router": "~2.7.0"
},

И Узел 8.4.0.

0 ответов

Другие вопросы по тегам