我的package.json文件是
{
"name": "learn-starter",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"export": "next export"
},
"dependencies": {
"@tailwindcss/typography": "^0.2.0",
"date-fns": "^2.16.1",
"geolib": "^3.3.1",
"google-map-react": "^2.1.3",
"graphql": "^15.3.0",
"graphql-request": "3.0.0",
"gray-matter": "^4.0.2",
"isomorphic-unfetch": "^3.0.0",
"libphonenumber-js": "^1.7.57",
"next": "9.3.5",
"next-seo": "^4.7.3",
"react": "16.13.1",
"react-animated-css": "^1.2.1",
"react-dom": "16.13.1",
"react-gtm-module": "^2.0.11",
"react-static-google-map": "^0.6.2",
"remark": "^12.0.1",
"remark-html": "^12.0.0",
"tailwindcss": "^1.7.6",
"use-position": "^0.0.7"
},
"devDependencies": {}
}我正尝试在getStaticProps中使用revaildate: 1,但我收到错误消息
Error: The `revalidate` property is not yet available for general use.
To try the experimental implementation, please use `unstable_revalidate` instead.正如我在package.json文件中看到的,我的nextjs版本是9.3.5,有人能帮我解决这个问题吗?
发布于 2021-07-06 13:36:14
尝试使用"unstable_revalidate“而不是"revalidate",因为在nextjs版本低于9.5中,"revalidate”关键字还没有泛化。
https://stackoverflow.com/questions/64660187
复制相似问题