Next broken after hard drive restore with error "normalScripts is not iterable" #17131
-
So this is a strange issue. I have a Next app that was working perfectly until a hard drive transfer/restore (on macOS), and now I consistently get a 500 Internal Server Error when trying to load it. I've tried reinstalling Next, all node modules, and even Docker, to no avail. Git confirms that there have been no changes since the last working commit. The error I get is: TypeError: normalScripts is not iterable It comes from the "getScripts" function of .next/server/pages/_document.js, specifically these lines:
The line that throws the error is the last one, because "normalScripts" is undefined. I modified the line two lines above to read Can anyone provide insight on where/how the "files" property is meant to be populated so I can continue investigating? I'm assuming this is somehow a permissions issue, or something along those lines. I can't think of anything else that makes sense. I'm using Next 9.5.0 if that helps (upgrading to 9.5.3 caused no change). Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @jeffwtm. The version(s) of Next you tried no longer have You'd need to use Next 9.4.4 or earlier to get this to work. Otherwise the comment in that Discussion I linked has some other workarounds. |
Beta Was this translation helpful? Give feedback.
Hi @jeffwtm. The version(s) of Next you tried no longer have
_documentProps
. See this answer for more info.You'd need to use Next 9.4.4 or earlier to get this to work. Otherwise the comment in that Discussion I linked has some other workarounds.