我一直致力于实现Next 9.3 的一些更新。我一直在移动getInitialProps,getServerSideProps并注意到我exportPathMap对这些页面变得动态变得不满意。运行一切正常next,但是当我去运行时next build && next export,我遇到了一些问题。
在文档的静态HTML导出它指出If your pages don't have getInitialProps you may not need next export at all; next build is already enough thanks to Automatic Static Optimization.我能得到那个工作愉快地与我的新getServerSideProps电话,当我运行next build && next start。我需要采取哪些步骤才能使其也适用,next export以便我可以通过 Netlify 进行部署。这是我尝试运行时遇到的错误示例next export
Error occurred prerendering page "/videos/[videos_title]". Read more: https://err.sh/next.js/prerender-error:
Error: Error for page /videos/[videos_title]: pages with `getServerSideProps` can not …Run Code Online (Sandbox Code Playgroud) 这可能是一个愚蠢的错误,但我无法弄清楚为什么这不起作用
var patt = new RegExp("\s[A-Za-z0-9]");
var filtering = patt.test("1 1");
console.log(filtering);
Run Code Online (Sandbox Code Playgroud)
我弄错了filtering,但从我的理解filtering应该是真的