Menu icon Foundation
Unable to add new files to template folder

Whenever I add a new file to the template folder in the client folder, I restart the gulp server, however when I try to get back to my website, there is an error on Git Bash:

$ gulp
[00:12:26] Using gulpfile ~\rbxx\gulpfile.js
[00:12:26] Starting 'build'...
[00:12:26] Starting 'clean'...
[00:12:26] Finished 'clean' after 31 ms
[00:12:26] Starting 'copy'...
[00:12:26] Starting 'copy:foundation'...
[00:12:27] Finished 'copy:foundation' after 208 ms
[00:12:27] Starting 'sass'...
[00:12:27] Starting 'uglify:foundation'...
[00:12:27] Starting 'uglify:app'...
[00:12:27] Finished 'uglify:app' after 171 ms
[00:12:27] Finished 'uglify:foundation' after 421 ms
[00:12:27] Starting 'uglify'...
[00:12:27] Finished 'uglify' after 7.89 μs
[00:12:28] Finished 'sass' after 1.45 s
[00:12:28] Finished 'copy' after 1.71 s
[00:12:28] Starting 'copy:templates'...
C:\Users\Kevin\rbxx\node_modules\gulp-util\lib\PluginError.js:73
if (!this.message) throw new Error('Missing error message');
^
Error: Missing error message
at new PluginError (C:\Users\Kevin\rbxx\node_modules\gulp-util\lib\PluginError.js:73:28)
at DestroyableTransform.bufferContents [as _transform] (C:\Users\Kevin\rbxx\node_modules\front-router\index.js:28:19)
at DestroyableTransform.Transform._read (C:\Users\Kevin\rbxx\node_modules\front-router\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:184:10)
at DestroyableTransform.Transform._write (C:\Users\Kevin\rbxx\node_modules\front-router\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:172:12)
at doWrite (C:\Users\Kevin\rbxx\node_modules\front-router\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:237:10)
at writeOrBuffer (C:\Users\Kevin\rbxx\node_modules\front-router\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:227:5)
at DestroyableTransform.Writable.write (C:\Users\Kevin\rbxx\node_modules\front-router\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:194:11)
at write (C:\Users\Kevin\rbxx\node_modules\gulp\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:623:24)
at flow (C:\Users\Kevin\rbxx\node_modules\gulp\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:632:7)
at DestroyableTransform.pipeOnReadable (C:\Users\Kevin\rbxx\node_modules\gulp\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:664:5)

If I remove the file from the folder, it works again.

If someone could really help me with this, it would be great. Thank you!!

git bashgulpfoundation for appsclient

Whenever I add a new file to the template folder in the client folder, I restart the gulp server, however when I try to get back to my website, there is an error on Git Bash:

$ gulp
[00:12:26] Using gulpfile ~\rbxx\gulpfile.js
[00:12:26] Starting 'build'...
[00:12:26] Starting 'clean'...
[00:12:26] Finished 'clean' after 31 ms
[00:12:26] Starting 'copy'...
[00:12:26] Starting 'copy:foundation'...
[00:12:27] Finished 'copy:foundation' after 208 ms
[00:12:27] Starting 'sass'...
[00:12:27] Starting 'uglify:foundation'...
[00:12:27] Starting 'uglify:app'...
[00:12:27] Finished 'uglify:app' after 171 ms
[00:12:27] Finished 'uglify:foundation' after 421 ms
[00:12:27] Starting 'uglify'...
[00:12:27] Finished 'uglify' after 7.89 μs
[00:12:28] Finished 'sass' after 1.45 s
[00:12:28] Finished 'copy' after 1.71 s
[00:12:28] Starting 'copy:templates'...
C:\Users\Kevin\rbxx\node_modules\gulp-util\lib\PluginError.js:73
if (!this.message) throw new Error('Missing error message');
^
Error: Missing error message
at new PluginError (C:\Users\Kevin\rbxx\node_modules\gulp-util\lib\PluginError.js:73:28)
at DestroyableTransform.bufferContents [as _transform] (C:\Users\Kevin\rbxx\node_modules\front-router\index.js:28:19)
at DestroyableTransform.Transform._read (C:\Users\Kevin\rbxx\node_modules\front-router\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:184:10)
at DestroyableTransform.Transform._write (C:\Users\Kevin\rbxx\node_modules\front-router\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:172:12)
at doWrite (C:\Users\Kevin\rbxx\node_modules\front-router\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:237:10)
at writeOrBuffer (C:\Users\Kevin\rbxx\node_modules\front-router\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:227:5)
at DestroyableTransform.Writable.write (C:\Users\Kevin\rbxx\node_modules\front-router\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:194:11)
at write (C:\Users\Kevin\rbxx\node_modules\gulp\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:623:24)
at flow (C:\Users\Kevin\rbxx\node_modules\gulp\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:632:7)
at DestroyableTransform.pipeOnReadable (C:\Users\Kevin\rbxx\node_modules\gulp\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:664:5)

If I remove the file from the folder, it works again.

If someone could really help me with this, it would be great. Thank you!!

Geoff Kimball over 3 years ago

It might be erroring out on a blank file. Try adding the front matter to the top of the file and see if the error goes away.

---
name: page
url: /page
---

If this fixes the problem, then that's a bug with Front Router which we can fix.