小智 11
这是一个 ESLint 错误,您可以禁用此特定检查。
检查我的 eslint 配置,我禁用了此规则。
//.eslintrc.js
module.exports = {
env: {
node: true,
browser: true,
es2021: true,
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@next/next/recommended",
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: "module",
},
plugins: ["react"],
rules: {
"react/no-unknown-property": ["error", { ignore: ["jsx"] }],
},
globals: {
React: "writable",
},
settings: {
react: {
version: "detect",
},
},
};
Run Code Online (Sandbox Code Playgroud)
您收到 ESLint 错误。我没有使用 Vercel 的经验,但我猜测它正在构建用于生产的应用程序,并将警告视为过程中的错误。如果您在本地运行时没有看到这些错误,则可能就是这种情况。为了帮助您解决确切的问题,您需要在引发错误的行周围发布 Product.jsx 的代码。
| 归档时间: |
|
| 查看次数: |
17644 次 |
| 最近记录: |