我一直在尝试将我的应用程序部署到 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 似乎需要它,我真的很感激解决这个问题的一些想法。
当前 package.json
{
"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"
}
}