2017-07-01 99 views
0

我有一個使用create-react-app創建的反應應用程序。node-sass-chokidar不能安裝在npm上安裝

爲了編譯sass文件,我使用了docs中推薦的node-sass-chokidar。

它的安裝和工作正常我的本地計算機(操作系統x)。但是,當我將它添加到我的生產服務器(運行nginx的Ubuntu 14.04.5 x32)並運行

npm install 

它沒有安裝。我可以通過檢查/ node_modules文件夾來看到它沒有顯示出來(就像我在本地機器上那樣)。

Sass安裝在服務器上。

當我運行NPM安裝我得到這個錯誤,我第一次運行它

> [email protected] 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 [email protected] 
node-pre-gyp info using [email protected] | 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 [email protected] and [email protected] (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 

回答

0

嘗試

npm install chokidar --save 

這個工作對我來說,當我

sudo npm install -g 

沒有安裝chokidar。更多關於npm-chokidar的資料here