postcss-font-awesome icon indicating copy to clipboard operation
postcss-font-awesome copied to clipboard

Don't pull the icons from the Font-Awesome master during install

Open tholewebgods opened this issue 7 years ago • 9 comments

The icons.json is downloaded using a package.json install script. The source is the master of the Font-Awesome project repository.

This way the installation is not reproducible and controllable. The plugin should either rely font-awesome as a peer dependency and use the _variables.scss from the node_modules location or the developer should be able to pass the _variables.scss path via the config.

The plugin might cache the icon.json based on the modification timestamp.

tholewebgods avatar Jul 18 '17 13:07 tholewebgods

@dan-gamble looks like they moved the files around in git for font-awesome 5.0, and now this is failing our CI builds:

npm ERR! execute Error: Command failed: npm install
npm ERR! execute /app/node_modules/postcss-font-awesome/generateIconConfig.js:17
npm ERR! execute         throw new Error(
npm ERR! execute         ^
npm ERR! execute 
npm ERR! execute Error: Failed to fetch variables from Github, got HTTP 404
npm ERR! execute     at ClientRequest.<anonymous> (/app/node_modules/postcss-font-awesome/generateIconConfig.js:17:15)
npm ERR! execute     at Object.onceWrapper (events.js:254:19)
npm ERR! execute     at ClientRequest.emit (events.js:159:13)
npm ERR! execute     at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:550:21)
npm ERR! execute     at HTTPParser.parserOnHeadersComplete (_http_common.js:117:23)
npm ERR! execute     at TLSSocket.socketOnData (_http_client.js:439:20)
npm ERR! execute     at TLSSocket.emit (events.js:159:13)
npm ERR! execute     at addChunk (_stream_readable.js:265:12)
npm ERR! execute     at readableAddChunk (_stream_readable.js:252:11)
npm ERR! execute     at TLSSocket.Readable.push (_stream_readable.js:209:10)

trxcllnt avatar Feb 06 '18 02:02 trxcllnt

Yeah, we're seeing the same thing:

Error: Failed to fetch variables from Github, got HTTP 404

error /home/ubuntu/crewseekers/node_modules/postcss-font-awesome: Command failed.
Exit code: 1
Command: node ./generateIconConfig.js
Arguments: 
Directory: /home/ubuntu/crewseekers/node_modules/postcss-font-awesome
Output:
/home/ubuntu/crewseekers/node_modules/postcss-font-awesome/generateIconConfig.js:17
        throw new Error(
        ^

Error: Failed to fetch variables from Github, got HTTP 404
    at ClientRequest.<anonymous> (/home/ubuntu/crewseekers/node_modules/postcss-font-awesome/generateIconConfig.js:17:15)
    at ClientRequest.g (events.js:291:16)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:474:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
    at TLSSocket.socketOnData (_http_client.js:363:20)
    at emitOne (events.js:96:13)
    at TLSSocket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

yarn returned exit code 1

danielsamuels avatar Feb 06 '18 12:02 danielsamuels

I'll try and get this rectified before the end of the day guys.

dan-gamble avatar Feb 06 '18 14:02 dan-gamble

I've just pushed 0.4.0. Does this rectify the issue for you?

dan-gamble avatar Feb 06 '18 15:02 dan-gamble

yes that fixed it for me thank you

boazblake avatar Feb 06 '18 16:02 boazblake

Awesome, will leave this open for another ~24 hours or so then close it if it fixes for all.

dan-gamble avatar Feb 06 '18 16:02 dan-gamble

this fixed the CI error for me, but icons aren't being displayed after the version bump

NickSpinosa avatar Feb 07 '18 17:02 NickSpinosa

I'll see if i can give that a look at over the weekend. I've not used this plugin for a while now so unsure on it's current state sorry.

dan-gamble avatar Feb 08 '18 10:02 dan-gamble

This is back, now that FA renamed/moved the branch name.

petejohansonxo avatar Feb 08 '22 17:02 petejohansonxo