astroturfcss / astroturf

Better Styling through Compiling: CSS-in-JS for those that want it all.
https://astroturfcss.github.io/astroturf/
MIT License
2.28k stars 60 forks source link

Error when installing dependencies #673

Closed yusuphgammut closed 3 years ago

yusuphgammut commented 3 years ago

Hi people.

First of all thank you for creating and maintaining this awesome project. I want to contribute an idea I have to allow users to set a function as the extension option value. However, when installing the dependencies I get this error:

warning Error running install script for optional dependency: "/Users/Me/Documents/Repos/astroturf/node_modules/chokidar/node_modules/fsevents: Command failed.
Exit code: 1
Command: node install
Arguments:
Directory: /Users/Me/Documents/Repos/astroturf/node_modules/chokidar/node_modules/fsevents
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.10.3
node-pre-gyp info using node@14.5.0 | darwin | x64
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp info check checked for \"/Users/Me/Documents/Repos/astroturf/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v83-darwin-x64/fse.node\" (not found)
... and a whole bunch of chain reaction errors here

Any suggestions on how to solve this issue? I'm using Node v14.15.4 on MacOs 10.14.6 but also tried with other Node versions getting the same results.

Thanks in advance.

yusuphgammut commented 3 years ago

The fsevents was causing the problem here. It wasn't exactly an error, but an annoying warning. Don't know exactly why this happens but there are a bunch of people with the same issue in various OSs as well. Seems that fsevents is an optional dependency, in this case from the chokidar module. The solution was simply to use yarn install --ignore-optional when installing both the root and example dependencies.