V
V
Vlad2021-04-09 16:17:28
JavaScript
Vlad, 2021-04-09 16:17:28

gulp rigger. Why does an error pop up when importing a subtemplate into a template?

The assembly takes place in Gulp 4.
There is a main index.html
. HTML templates are imported into it using "gulp-rigger": "^0.5.8".
When I try to import a subtemplate into one of these templates, I get the following error.

607052d666f8a743025564.jpeg

Starting 'html_build'...
[16:00:47] 'html_build' errored after 120 ms
[16:00:47] TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
    at Function.from (buffer.js:333:9)
    at new Buffer (buffer.js:289:17)
    at C:\OSPanel\domains\my-site\node_modules\gulp-rigger\index.js:20:29
    at Rigger.<anonymous> (C:\OSPanel\domains\my-site\node_modules\rigger\index.js:719:9)

    /* etc... */


I can't figure out what is causing this error?
It is noteworthy that in another project with the same package.json, a similar import using Rieger works!
What's the catch here?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vyach Gor, 2021-04-09
@sharnirio

I would like to look at the config of the second project, since I worked with "gulp-rigger" for a long time (3-4 years exactly) - it was always impossible to work with nested imports there. I will assume that in the second project, imports are implemented in a different way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question