kev*_*vin 8 reactjs webpack next.js chokidar next-pwa
我一直在尝试将我的应用程序部署到 vercel 一段时间,并且已经阅读了大量关于 stackoverflow 的帖子,其中存在相同/类似的fsevents
问题。尽管如此,我仍然收到下面发布的相同错误。
我尝试过的事情:
node_modules
& package-lock.json
,然后运行:npm i -f
"optionalDependencies": {"fsevents": "^2.3.2"}
,然后npm i -f
fsevents
在package.json
我对整个 fsevents/chokidar 包的内容/原因不是很熟悉,但在我阅读完之后,我的 MacOS 似乎需要它,我真的很感激一些解决这个问题的想法。
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "eslint .",
"lint:fix": "eslint --fix ."
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx}": [
"prettier --write",
"eslint --fix ."
]
},
"dependencies": {
"firebase": "^8.2.5",
"firebase-admin": "^9.4.2",
"firebase-functions": "^3.13.1",
"fsevents": "^2.3.2",
"js-cookies": "^1.0.4",
"next": "10.0.6",
"next-pwa": "^5.0.5",
"nookies": "^2.5.2",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-redux": "^7.2.2",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
"styled-components": "^5.2.1"
},
"optionalDependencies": {
"fsevents": "^2.3.2"
},
"devDependencies": {
"@types/node": "^14.14.25",
"@types/react": "^17.0.1",
"@types/react-redux": "^7.1.16",
"@types/styled-components": "^5.1.7",
"babel-eslint": "^9.0.0",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-nextjs": "^1.0.7",
"eslint-config-prettier": "^4.3.0",
"eslint-plugin-html": "^5.0.5",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^1.7.0",
"husky": "^4.3.8",
"lint-staged": "^10.5.3",
"prettier": "^1.19.1",
"redux-devtools-extension": "^2.13.8",
"typescript": "^4.1.3",
"webpack": "^5.21.1"
}
}
Run Code Online (Sandbox Code Playgroud)
jos*_*osh 17
许多人在几年前就抱怨过这一点。
有时修复方法是升级到较新的 npm。(运行 npm 7.7 并且仍然有)
通常解决方法就是:
npm install -f
Run Code Online (Sandbox Code Playgroud)
所以强制它在这里效果很好。
归档时间: |
|
查看次数: |
4641 次 |
最近记录: |