英文:
next-dev.js:20 TypeError: Cannot set properties of undefined (setting 'hook'),
问题
这个错误在启动应用程序时或者只是在更新 Redux 状态时会出现,有时它不会在一些状态更新中显示,但出现在整个应用程序中的某些原因。
next-dev.js:20 TypeError: Cannot set properties of undefined (setting 'hook')
我遇到了与 https://stackoverflow.com/questions/73129969/next-js-typeerror-cannot-set-properties-of-undefined-setting-hook
中提到的相同问题,但我的 package.json 文件不同。以下是我的 package.json 文件:
{
"name": "abc-reactjs-boilerplate",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "concurrently \"next dev\" \"tailwindcss -i styles/globals.scss -o styles/dist.css -w\"",
"build": "tailwindcss -m -i styles/globals.scss -o styles/dist.css && next build",
"start": "next start",
"lint": "prettier --check .",
"setup": "node selectInstallation",
"test": "jest",
"test:ci": "jest --ci",
"format": "prettier . --write"
},
"dependencies": {
"@popperjs/core": "^2.11.6",
"@tailwindcss/line-clamp": "^0.4.4",
"@types/js-cookie": "^3.0.2",
"@types/node": "18.11.9",
"@types/react": "18.0.25",
"@types/react-dom": "18.0.9",
"antd": "^5.5.0",
"axios": "^1.2.1",
"dayjs": "^1.11.7",
"eslint": "8.28.0",
"eslint-config-next": "13.0.4",
"formik": "^2.2.9",
"jotai": "^1.11.1",
"js-cookie": "^3.0.1",
"next": "13.0.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-icons": "^4.8.0",
"typescript": "4.9.3",
"yup": "^1.1.1"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"autoprefixer": "^10.4.14",
"concurrently": "^7.6.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"postcss": "^8.4.23",
"sass": "^1.62.1",
"tailwindcss": "^3.3.2"
}
}
英文:
his error just "explodes" when starting the app or just update the redux state sometimes it do not shows for few state updates, but for some reason it appears all along the app
next-dev.js:20 TypeError: Cannot set properties of undefined (setting 'hook'),
I have the same issues as mentioned in https://stackoverflow.com/questions/73129969/next-js-typeerror-cannot-set-properties-of-undefined-setting-hook
but my package.json file is different.
below is my package.json file
{
"name": "abc-reactjs-boilerplate",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "concurrently \"next dev\" \"tailwindcss -i styles/globals.scss -o styles/dist.css -w\"",
"build": "tailwindcss -m -i styles/globals.scss -o styles/dist.css && next build",
"start": "next start",
"lint": "prettier --check .",
"setup": "node selectInstallation",
"test": "jest",
"test:ci": "jest --ci",
"format": "prettier . --write"
},
"dependencies": {
"@popperjs/core": "^2.11.6",
"@tailwindcss/line-clamp": "^0.4.4",
"@types/js-cookie": "^3.0.2",
"@types/node": "18.11.9",
"@types/react": "18.0.25",
"@types/react-dom": "18.0.9",
"antd": "^5.5.0",
"axios": "^1.2.1",
"dayjs": "^1.11.7",
"eslint": "8.28.0",
"eslint-config-next": "13.0.4",
"formik": "^2.2.9",
"jotai": "^1.11.1",
"js-cookie": "^3.0.1",
"next": "13.0.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-icons": "^4.8.0",
"typescript": "4.9.3",
"yup": "^1.1.1"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"autoprefixer": "^10.4.14",
"concurrently": "^7.6.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"postcss": "^8.4.23",
"sass": "^1.62.1",
"tailwindcss": "^3.3.2"
}
}
Removing node_modules but didn't worked
答案1
得分: -1
这个错误是由一些恶意的Chrome扩展程序引起的,我已经使用了访客Chrome浏览器,错误不再出现。
英文:
This error was due to the some malicious chrome extension, i have used the guest chrome browser and the errors are gone.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论