Html-webpack-plugin: fails to require `lodash` on watch

Created on 9 Sep 2016  路  4Comments  路  Source: jantimon/html-webpack-plugin

Getting this strange error after saving a file when Webpack is in watch mode:

(It works the first time, but then on file changes.)

Do you know what the solution might be? Only just started seeing this recently.

Html Webpack Plugin:
  Error: Child compilation failed:
  Module build failed: (SystemJS) ENOENT: no such file or directory, open '/Users/Storm/dev/voteplz/www/lodash'
  Error: ENOENT: no such file or directory, open '/Users/Storm/dev/voteplz/www/lodash'

  - Error

  - Error loading /Users/Storm/dev/voteplz/www/lodash as "lodash" from /Users/Storm/dev/voteplz/www/node_modules/html-webpack-pl    ugin/lib/loader.js:

  - Error: (SystemJS) ENOENT: no such file or directory, open '/Users/Storm/dev/voteplz/www/lodash'

  - Error: ENOENT: no such file or directory, open '/Users/Storm/dev/voteplz/www/lodash'

  - Error

  - Error loading /Users/Storm/dev/voteplz/www/lodash as "lodash" from /Users/Storm/dev/voteplz/www/node_modules/html-webpack-pl    ugin/lib/loader.js

  - compiler.js:76 
    [www]/[html-webpack-plugin]/lib/compiler.js:76:16

  - Compiler.js:251 Compiler.
    [www]/[webpack]/lib/Compiler.js:251:10

  - Compiler.js:442 
    [www]/[webpack]/lib/Compiler.js:442:12

  - Tapable.js:81 next
    [www]/[tapable]/lib/Tapable.js:81:11

  - CachePlugin.js:61 Compiler.
    [www]/[webpack]/lib/CachePlugin.js:61:4

  - Tapable.js:85 Compiler.applyPluginsAsync
    [www]/[tapable]/lib/Tapable.js:85:13

  - Compiler.js:439 Compiler.
    [www]/[webpack]/lib/Compiler.js:439:9

  - Tapable.js:73 Compilation.applyPluginsAsync
    [www]/[tapable]/lib/Tapable.js:73:70

  - Compilation.js:609 Compilation.
    [www]/[webpack]/lib/Compilation.js:609:18

  - Tapable.js:73 Compilation.applyPluginsAsync
    [www]/[tapable]/lib/Tapable.js:73:70

  - Compilation.js:600 Compilation.
    [www]/[webpack]/lib/Compilation.js:600:10

  - Tapable.js:73 Compilation.applyPluginsAsync
    [www]/[tapable]/lib/Tapable.js:73:70

  - Compilation.js:595 Compilation.
    [www]/[webpack]/lib/Compilation.js:595:9

  - Tapable.js:73 Compilation.applyPluginsAsync
    [www]/[tapable]/lib/Tapable.js:73:70

  - Compilation.js:591 Compilation.
    [www]/[webpack]/lib/Compilation.js:591:8

  - Tapable.js:73 Compilation.applyPluginsAsync
    [www]/[tapable]/lib/Tapable.js:73:70

  - Compilation.js:539 Compilation.seal
    [www]/[webpack]/lib/Compilation.js:539:7

  - Compiler.js:436 Compiler.
    [www]/[webpack]/lib/Compiler.js:436:15

  - Tapable.js:152 
    [www]/[tapable]/lib/Tapable.js:152:11

  - Compilation.js:432 Compilation.
    [www]/[webpack]/lib/Compilation.js:432:10

  - Compilation.js:408 
    [www]/[webpack]/lib/Compilation.js:408:12

  - Compilation.js:323 
    [www]/[webpack]/lib/Compilation.js:323:10

  - async.js:52 
    [www]/[webpack]/[async]/lib/async.js:52:16

  - async.js:236 Object.async.forEachOf.async.eachOf
    [www]/[webpack]/[async]/lib/async.js:236:30

  - async.js:209 Object.async.forEach.async.each
    [www]/[webpack]/[async]/lib/async.js:209:22

  - Compilation.js:192 Compilation.addModuleDependencies
    [www]/[webpack]/lib/Compilation.js:192:8

  - Compilation.js:177 Compilation.processModuleDependencies
    [www]/[webpack]/lib/Compilation.js:177:7

  - Compilation.js:403 Compilation.moduleReady
    [www]/[webpack]/lib/Compilation.js:403:9

  - Compilation.js:399 Compilation.
    [www]/[webpack]/lib/Compilation.js:399:16

  - Compilation.js:124 
    [www]/[webpack]/lib/Compilation.js:124:4

  - Array.forEach

  - Compilation.js:123 callback
    [www]/[webpack]/lib/Compilation.js:123:12

  - Compilation.js:147 
    [www]/[webpack]/lib/Compilation.js:147:10

  - NormalModule.js:214 setError
    [www]/[webpack]/lib/NormalModule.js:214:3

  - NormalModule.js:178 
    [www]/[webpack]/lib/NormalModule.js:178:18

  - NormalModule.js:137 
    [www]/[webpack]/lib/NormalModule.js:137:11

  - LoaderRunner.js:328 
    [www]/[loader-runner]/lib/LoaderRunner.js:328:11

  - LoaderRunner.js:141 
    [www]/[loader-runner]/lib/LoaderRunner.js:141:18

Most helpful comment

Btw for anyone else getting something similar, it turned out to be because of postcss-import not working in the latest 8.1.2 release. https://github.com/postcss/postcss-import/issues/220

All 4 comments

The fallback loader seems to have problems with your configuration - try template: "!!raw!template.ejs" and use the raw loader

Btw for anyone else getting something similar, it turned out to be because of postcss-import not working in the latest 8.1.2 release. https://github.com/postcss/postcss-import/issues/220

@ianstormtaylor thanks. This just saved me so much debug time.

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lcxfs1991 picture lcxfs1991  路  4Comments

azat-io picture azat-io  路  4Comments

hp8wvvvgnj6asjm7 picture hp8wvvvgnj6asjm7  路  3Comments

var-bp picture var-bp  路  3Comments

Rowno picture Rowno  路  3Comments