biotope / biotope-build

Biotope Build Framework
https://build.biotope.sh
MIT License
24 stars 10 forks source link

useref:assets breaks builds #319

Open luke-m opened 5 years ago

luke-m commented 5 years ago

Using biotope-build version 0.6.2 or 7.0.0 or 7.1.0, I always get this error:

[12:13:50] Starting 'useref:assets'...
[12:13:50] Starting 'image:resources:dist'...
[12:13:50] Starting 'image:component:dist'...
[12:13:50] Starting 'favicons'...
[12:13:50] gulp-imagemin: Minified 0 images
[12:13:50] Finished 'image:resources:dist' after 531 ms
[12:13:50] gulp-imagemin: Minified 0 images
[12:13:50] Finished 'image:component:dist' after 456 ms
events.js:173
      throw er; // Unhandled 'error' event
      ^

Error: Error: File not found with singular glob: /Users/lukas.mueller/Documents/dev/biotope-website/.tmp/resources/js/handlebars.templates.js (if this was purposeful, use `allowEmpty` option)
    at DestroyableTransform.<anonymous> (/Users/lukas.mueller/Documents/dev/biotope-website/node_modules/gulp-useref/index.js:67:32)
    at Object.apply (/Users/lukas.mueller/Documents/dev/biotope-website/node_modules/harmony-reflect/reflect.js:2064:37)
    at DestroyableTransform.emit (events.js:197:13)
    at Object.apply (/Users/lukas.mueller/Documents/dev/biotope-website/node_modules/harmony-reflect/reflect.js:2064:37)
    at Pumpify.emit (events.js:197:13)
    at Pumpify.Duplexify._destroy (/Users/lukas.mueller/Documents/dev/biotope-website/node_modules/duplexify/index.js:191:15)
    at /Users/lukas.mueller/Documents/dev/biotope-website/node_modules/duplexify/index.js:182:10
    at processTicksAndRejections (internal/process/next_tick.js:74:9)

Emitted 'error' event at:
    at DestroyableTransform.<anonymous> (/Users/lukas.mueller/Documents/dev/biotope-website/node_modules/gulp-useref/index.js:67:18)
    at Object.apply (/Users/lukas.mueller/Documents/dev/biotope-website/node_modules/harmony-reflect/reflect.js:2064:37)
    [... lines matching original stack trace ...]

When I comment out the useref:assets task, the build goes through. However, and I'm not sure if this is related to this task, but the scripts.all.min.js & styles.all.min.css files don't get generated.

luke-m commented 5 years ago

Fixed by putting any .hbs file into src/resources/hbs. According to @timomayer this is because there are no client-side templates in the project yet, which is not allowed.