My Netlify site name is thirdfort-marketing-internal
I just upgraded to Gatsby 4 (and integrated Prismic headless CMS as part of the process) but unfortunately I’m getting a bug when previewing my Pull Request.
{
"errorType": "Runtime.ImportModuleError",
"errorMessage": "Error: Cannot find module '/var/task/.cache/page-ssr'\nRequire stack:\n- /var/task/.netlify/functions-internal/__dsg/__dsg.js\n- /var/task/__dsg.js\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js",
"trace": [
"Runtime.ImportModuleError: Error: Cannot find module '/var/task/.cache/page-ssr'",
"Require stack:",
"- /var/task/.netlify/functions-internal/__dsg/__dsg.js",
"- /var/task/__dsg.js",
"- /var/runtime/UserFunction.js",
"- /var/runtime/index.js",
" at _loadUserApp (/var/runtime/UserFunction.js:100:13)",
" at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)",
" at Object.<anonymous> (/var/runtime/index.js:43:30)",
" at Module._compile (internal/modules/cjs/loader.js:1072:14)",
" at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)",
" at Module.load (internal/modules/cjs/loader.js:937:32)",
" at Function.Module._load (internal/modules/cjs/loader.js:778:12)",
" at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)",
" at internal/main/run_main_module.js:17:47"
]
}
The annoying thing is that I’m not using any functions or DSG pages. It seems that the error is coming from there. Is there a way to fix this or disable the functions altogether?
I’m using the correct ENV for my builds so it supports Gatsby 4
NODE_VERSION
14
AWS_LAMBDA_JS_RUNTIME
nodejs14.x
Goal is to:
get the 404 page if I go to a page that doesn’t exist
be able to preview Prismic pages that are in draft (not live yet).
Anything that could help will be amazing - I’ve tried pretty much anything I can think of but there isn’t much info online about it.
Just wanted to check if there are any updates on this? At the moment, this is a big blocker to me merging the branch so I might need to do downgrade to Gatsby 3 before doing so.
Since you’re not using any DSG, I’m assuming it’s a fully static export? In that case, would it be possible for you to try uninstall the build plugin auto-installed by Netlify and give it a try?
Well, it’s good to know that the 404 page’s errors have been fixed. I would have assumed that Essential Gatsby Plugin would not change anything for purely static websites.
Sorry for the delay here, it appears to be a bug and the team is looking into it.
Meanwhile, the devs said that since you’re not using DSG, you should be fine with the non-beta version of the plugin as that’s not supposed to handle DSG.
Any updates on this from the team? Not having 404 pages could hurt SEO, and disabling SSR (by downgrading to @netlify/plugin-gatsby v1.0.3) could hurt too.
I didn’t try downgrading the first of those sites but I’ve just seen that there’s been a v3 release which I’ve upgraded to and now don’t have the issue on that site either.