首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >错误:`revalidate`属性尚不可用于常规用途

错误:`revalidate`属性尚不可用于常规用途
EN

Stack Overflow用户
提问于 2020-11-03 17:37:16
回答 1查看 215关注 0票数 1

我的package.json文件是

代码语言:javascript
复制
{
  "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,但我收到错误消息

代码语言:javascript
复制
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,有人能帮我解决这个问题吗?

EN

回答 1

Stack Overflow用户

发布于 2021-07-06 13:36:14

尝试使用"unstable_revalidate“而不是"revalidate",因为在nextjs版本低于9.5中,"revalidate”关键字还没有泛化。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64660187

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档