【发布时间】:2018-09-19 01:40:51
【问题描述】:
我正在按照https://blog.heroku.com/deploying-react-with-zero-configuration 中提到的步骤进行操作,并且能够创建项目。但是当我尝试推送项目时,它给了我fsevents 错误。这是一个全新的项目。
- 我在
.gitignore中添加了node_modules - 我已经尝试过
npm i -f,如https://github.com/angular/angular/issues/13935 - 我已尝试将
fsevents添加到optionalDependencies,如https://github.com/angular/angular-cli/issues/8551 中所述
这些都没有帮助我。我得到的错误:
Building dependencies
remote: Installing node modules (package.json + package-lock)
remote: npm ERR! code EBADPLATFORM
remote: npm ERR! notsup Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
remote: npm ERR! notsup Valid OS: darwin
remote: npm ERR! notsup Valid Arch: any
remote: npm ERR! notsup Actual OS: linux
remote: npm ERR! notsup Actual Arch: x64
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /tmp/npmcache.y1nYC/_logs/2018-04-09T15_10_24_227Z-debug.log
remote:
remote: -----> Build failed
我的package.json如下
{
"name": "my_site",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.3.1",
"react-dom": "^16.3.1",
"react-scripts": "1.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
【问题讨论】:
-
有趣,我也发生了同样的事情
标签: node.js macos reactjs heroku fsevents