reactjs - node-sass-chokidar 没有安装在 npm install 上

标签 reactjs ubuntu nginx npm node-sass

我有一个使用 create-react-app 创建的 react 应用程序。

为了编译 sass 文件,我使用了 docs 中推荐的 node-sass-chokidar。 .

它在我的本地机器(os x)上安装和工作正常。但是当我将它添加到我的生产服务器(运行 nginx 的 Ubuntu 14.04.5 x32)并运行时

npm install

它没有安装。我可以通过检查未显示的/node_modules 文件夹来看到这一点(就像在我的本地计算机上一样)。

Sass 安装在服务器上。

当我运行 npm install 时,我第一次运行它时收到此错误
> fsevents@1.0.17 install 
/var/www/bertgenerator.com/html/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

node-pre-gyp info it worked if it ends with ok
node-pre-gyp verb cli [ '/usr/bin/nodejs',
node-pre-gyp verb cli '/var/www/bertgenerator.com/html/node_modules/fsevents/node_modules/.bin 
node-pre-gyp',
node-pre-gyp verb cli   'install',
node-pre-gyp verb cli   '--fallback-to-build' ]
node-pre-gyp info using node-pre-gyp@0.6.32
node-pre-gyp info using node@6.11.0 | linux | ia32
node-pre-gyp verb command install []
node-pre-gyp info check checked for "/var/www/bertgenerator.com/html/node_modules/fsevents/lib/binding/Release/node-v48-linux-ia32/fse.node" (not found)
node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.17/fse-v1.0.17-node-v48-linux-ia32.tar.gz
node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.17/fse-v1.0.17-node-v48-linux-ia32.tar.gz
node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.17/fse-v1.0.17-node-v48-linux-ia32.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.0.17 and node@6.11.0 (node-v48 ABI) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.17/fse-v1.0.17-node-v48-linux-ia32.tar.gz
node-pre-gyp verb command build [ 'rebuild' ]
make: Entering directory `/var/www/bertgenerator.com/html/node_modules/fsevents/build'
  SOLINK_MODULE(target) Release/obj.target/.node
  COPY Release/.node
make: Leaving directory `/var/www/bertgenerator.com/html/node_modules/fsevents/build'
node-pre-gyp info ok

不知道有没有关系。如果我再次运行 npm install ,我不会收到错误消息。

我试图删除/node_modules 文件夹并运行
npm cache clean


sudo npm install

最佳答案

尝试

npm install chokidar --save

这对我有用,当我的
sudo npm install -g

没有安装chokidar。有关 npm-chokidar 的更多信息 here

关于reactjs - node-sass-chokidar 没有安装在 npm install 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44865930/

相关文章:

javascript - 在 ListView 中打开和关闭一个可扩展项目 - React Native

javascript - 即使reactjs收到了数据,为什么我的笔记没有显示/更新?

reactjs - 当 ngrok 尝试连接到 React 开发服务器时,主机 header 无效

c++ - 无法使用静态 TLS 加载更多对象

nginx - 异常 : bus. 使用 nginx 作为代理服务器的 Odoo 8 多处理总线不可用

redirect - nginx 重定向取决于主机

javascript - 如何在一行中呈现状态列表?

ubuntu - Ubuntu 更新后 Intellij 一直卡住

linux - 丢失的 httpd.conf 文件位于 apache

ruby-on-rails - 瘦服务器上的 502 网关错误,为什么?