citizennet / purescript-ocelot

An opinionated component library for Halogen apps
https://citizennet.github.io/purescript-ocelot/
Apache License 2.0
102 stars 15 forks source link

FBCM-5353 Add Outbrain Icon #259

Closed boygao1992 closed 1 year ago

boygao1992 commented 1 year ago

What does this pull request do?

Add icon for Outbrain.

How should this be manually tested?

davezuch commented 1 year ago
  • make build

Hmm, I'm getting this error when I try to build, have you encountered this?

$ make build
Makefile:44: warning: overriding commands for target `/Users/dave/dev/purescript-ocelot/dist'
/Users/dave/dev/purescript-ocelot/css/Makefile:44: warning: ignoring old commands for target `/Users/dave/dev/purescript-ocelot/dist'
cd /Users/dave/dev/purescript-ocelot/css && npx webpack
node:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/Users/dave/dev/purescript-ocelot/css/node_modules/webpack/lib/util/createHash.js:90:53)
    at NormalModule._initBuildHash (/Users/dave/dev/purescript-ocelot/css/node_modules/webpack/lib/NormalModule.js:401:16)
    at handleParseError (/Users/dave/dev/purescript-ocelot/css/node_modules/webpack/lib/NormalModule.js:449:10)
    at /Users/dave/dev/purescript-ocelot/css/node_modules/webpack/lib/NormalModule.js:481:5
    at /Users/dave/dev/purescript-ocelot/css/node_modules/webpack/lib/NormalModule.js:342:12
    at /Users/dave/dev/purescript-ocelot/css/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/Users/dave/dev/purescript-ocelot/css/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at Array.<anonymous> (/Users/dave/dev/purescript-ocelot/css/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/Users/dave/dev/purescript-ocelot/css/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /Users/dave/dev/purescript-ocelot/css/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
    at /Users/dave/dev/purescript-ocelot/css/node_modules/graceful-fs/graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.15.0
make: *** [/Users/dave/dev/purescript-ocelot/dist/cn-tailwind.css] Error 1
boygao1992 commented 1 year ago

Hmm, I'm getting this error when I try to build, have you encountered this?

No. Maybe something to do with npm or node version?

➜  ~ npm -v
8.19.4
➜  ~ node -v
v14.21.3
davezuch commented 1 year ago

Hmm, I'm getting this error when I try to build, have you encountered this?

No. Maybe something to do with npm or node version?

➜  ~ npm -v
8.19.4
➜  ~ node -v
v14.21.3

Yup, found this: https://bobbyhadz.com/blog/react-error-digital-envelope-routines-unsupported

I was able to build by running:

$ NODE_OPTIONS=--openssl-legacy-provider make build

We should use direnv to pin node to the desired version, but that's outside the scope of this PR.

boygao1992 commented 1 year ago

We should use direnv to pin node to the desired version, but that's outside the scope of this PR.

I'm using nvm to keep multiple versions of node. I'm assuming we are still on v14 in most of our projects in CN.

boygao1992 commented 1 year ago

Thanks for the review! I'll make a new release soon.

davezuch commented 1 year ago

We should use direnv to pin node to the desired version, but that's outside the scope of this PR.

I'm using nvm to keep multiple versions of node. I'm assuming we are still on v14 in most of our projects in CN.

Yeah I just use nix shell for any packages I need. I can specify the version I want installed, but it's not something I should have to remember per repo, better to make it available automatically like we do in orders. But we can worry about that later.