Building pages...
{ pageName: '',
pageConfigFile: '/Users/chriscalo/Projects/viaticus/pages/index.page.js',
pageFiles: {} }
****************************************
************* Stack Trace **************
****************************************
Error:
at stripSameSuffixAndPrefix.forEach (/Users/chriscalo/Projects/viaticus/node_modules/@goldpage/webpack/runBuild.js:136:14)
at Array.forEach (<anonymous>)
at Function.getPageFiles (/Users/chriscalo/Projects/viaticus/node_modules/@goldpage/webpack/runBuild.js:128:6)
at Function.<anonymous> (/Users/chriscalo/Projects/viaticus/node_modules/webpack-ssr/Build.js:111:46)
at Generator.next (<anonymous>)
at buildAll (/Users/chriscalo/Projects/viaticus/node_modules/@rebuild/iso/IsoBuilder.js:327:36)
****************************************
************ Internal Error ************
****************************************
I was able to track things down to stripSameSuffixAndPrefix(arr) assumes that arr has at least 2 entries because it seems to compare them to each other.
Should it instead strip away the pages directory path and the .page.js extension, something like the following?
I made some progress integrating Goldpage into my app, but when running
goldpage dev
, I was getting an error.I kept the setup minimal. Here's
pages/index.page.js
:And here's
pages/test.vue
:I followed the stack trace to
@goldpage/webpack/runBuild.js
and inserted aconsole.log()
statement to see what was happening:It seems to be throwing in this line:
Here's the error output:
I was able to track things down to
stripSameSuffixAndPrefix(arr)
assumes thatarr
has at least 2 entries because it seems to compare them to each other.Should it instead strip away the
pages
directory path and the.page.js
extension, something like the following?For now, I found a workaround of ensuring that I have at least two
*.page.js
files in thepages
directory.