5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

hard-source-webpack-plugin でエラーになった時の対処法

Last updated at Posted at 2018-12-07

laravel-mixで以下のように設定

mix.webpackConfig({
  devtool: "source-map",
  plugins: [new hardSourceWebpackPlugin()]
});

ここでyarn watchすると以下のように処理が止まる。yarn devは処理が止まらず成功する。

[centos@5deeeb5bfbc3 html]$ yarn watch &
[1] 2004
yarn run v1.10.1
$ cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

Webpack is watching the files…

[hardsource:ad92f9f9] Using 17 MB of disk space.
[hardsource:ad92f9f9] Tracking node dependencies with: yarn.lock.
[hardsource:ad92f9f9] Reading from cache ad92f9f9...
 10% building modules 6/6 modules 0 active/var/www/html/node_modules/loader-runner/lib/LoaderRunner.js:19
        var i = req.indexOf("?");

キャッシュ、上記にReading from cache ad92f9f9...とあるので、以下のように消したらとりあえず動いた。

rm -rf node_modules/.cache/hard-source/ad92f9f920d89dd2a52183af7881d7d8fb99d4e88d612e39fbd2168d391e200d/
5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?