ubuntu node-sass-chokidar不会在npm install上安装

htzpubme  于 2024-01-06  发布在  其他
关注(0)|答案(2)|浏览(133)

我有一个使用react-react-app创建的react应用程序。
为了编译sass文件,我使用了文档中推荐的node-sass-chokidar。
它在我的本地机器(os x)上安装和工作正常。但是当我将它添加到我的生产服务器(Ubuntu 14.04.5 x32运行nginx)并运行

  1. npm install

字符串
它没有安装。我可以通过检查/node_modules文件夹来看到这一点,在那里它没有显示(就像在我的本地机器上一样)。
Sass安装在服务器上。
当我运行npm install时,我在第一次运行它时得到这个错误

  1. > [email protected] install
  2. /var/www/bertgenerator.com/html/node_modules/fsevents
  3. > node-pre-gyp install --fallback-to-build
  4. node-pre-gyp info it worked if it ends with ok
  5. node-pre-gyp verb cli [ '/usr/bin/nodejs',
  6. node-pre-gyp verb cli '/var/www/bertgenerator.com/html/node_modules/fsevents/node_modules/.bin
  7. node-pre-gyp',
  8. node-pre-gyp verb cli 'install',
  9. node-pre-gyp verb cli '--fallback-to-build' ]
  10. node-pre-gyp info using [email protected]
  11. node-pre-gyp info using [email protected] | linux | ia32
  12. node-pre-gyp verb command install []
  13. 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)
  14. 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
  15. 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
  16. 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
  17. node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to source compile with node-gyp)
  18. 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
  19. node-pre-gyp verb command build [ 'rebuild' ]
  20. make: Entering directory `/var/www/bertgenerator.com/html/node_modules/fsevents/build'
  21. SOLINK_MODULE(target) Release/obj.target/.node
  22. COPY Release/.node
  23. make: Leaving directory `/var/www/bertgenerator.com/html/node_modules/fsevents/build'
  24. node-pre-gyp info ok


我不知道这是否相关。如果我再次运行npm install,我不会得到错误。
我尝试删除/node_modules文件夹并运行

  1. npm cache clean


以及

  1. sudo npm install

zour9fqk

zour9fqk1#

尝试

  1. npm install chokidar --save

字符串
这对我很有效,当我的

  1. sudo npm install -g


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

u3r8eeie

u3r8eeie2#

你试过sudo npm i吗?
其他方法都不管用的时候这对我很管用。
npm i在某些情况下会默默地失败,因为某些软件包需要管理权限,sudo可以确保这一点。

相关问题