cymen Github contribution chart
cymen Github Stats
cymen Most Used Languages

Activity

28 Sep 2022

Cymen

started

Started On 28 Sep 2022 at 06:22:32

Cymen

started

Started On 28 Sep 2022 at 06:15:39

Cymen

started

Started On 21 Sep 2022 at 08:06:33

Cymen

started

Started On 21 Sep 2022 at 08:06:30

Cymen

started

Started On 15 Sep 2022 at 02:42:49
Issue Comment

Cymen

Unable to install in mac with latest poppler

Seeing below error while installing in mac with latest poppler.

> node-gyp rebuild

Package poppler-qt5 was not found in the pkg-config search path.
Perhaps you should add the directory containing `poppler-qt5.pc'
to the PKG_CONFIG_PATH environment variable
No package 'poppler-qt5' found
gyp: Call to 'pkg-config --libs  cairo poppler-qt5' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/ram4975/.nvm/versions/node/v12.21.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Darwin 20.6.0
gyp ERR! command "/Users/ram4975/.nvm/versions/node/v12.21.0/bin/node" "/Users/ram4975/.nvm/versions/node/v12.21.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/ram4975/git/ms-pdf-to-json/node_modules/pdf-fill-form
gyp ERR! node -v v12.21.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN @grpc/grpc-js@1.0.5 requires a peer of google-auth-library@5.x || 6.x but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pdf-fill-form@5.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the pdf-fill-form@5.1.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: 

Looks like latest poppler installs by default with qt6 not with qt5 anymore. When i look at poppler pkgconfig folder all is see is poppler-qt6.pc not poppler-qt5.pc.

Is there any workaround to proceed further?

Forked On 10 Sep 2022 at 05:22:32

Cymen

https://stackoverflow.com/a/69347544/122868

The above with minor tweak worked for me. I checked which qt packages I had installed from homebrew:'

% brew ls|grep qt
poppler-qt5
qt
qt@5 

Then I ran:

brew unlink qt
brew unlink qt@5
brew link qt@5 

Then I opened a new terminal and was able to successfully complete the install. I should note I have node locked down to v12 on the project in question just in case this still doesn't work with later node versions.

Commented On 10 Sep 2022 at 05:22:32

Cymen

oops, use correct resume

Pushed On 03 Sep 2022 at 03:20:18

Cymen

add updated resume

Pushed On 03 Sep 2022 at 02:51:03

Cymen

started

Started On 02 Sep 2022 at 07:06:20

Cymen

started

Started On 02 Sep 2022 at 06:49:14

Cymen

started

Started On 26 Aug 2022 at 04:03:17
Issue Comment

Cymen

[FEATURE] Avoid using nodejs modules

Is your feature request related to a problem? Please describe. The library is using the util module, which is a module from nodejs. Recent bundlers like Vite and Webpack 5 don't shim nodejs modules anymore, so this would fail to bundle for them.

Describe the solution you'd like Refactor the code to avoid the util module, maybe with a custom implementation of the inherits function specifically, since that's the only utility used.

Describe alternatives you've considered Document that this library does not work without shimming nodejs modules.

Additional context Initially reported at https://github.com/sveltejs/kit/issues/2548. Related #37. May be related #52

Forked On 13 Aug 2022 at 02:02:54

Cymen

@ryan-rowland Did anything come out of the internal ticket?

Commented On 13 Aug 2022 at 02:02:54
Issue Comment

Cymen

[FEATURE] Avoid using nodejs modules

Is your feature request related to a problem? Please describe. The library is using the util module, which is a module from nodejs. Recent bundlers like Vite and Webpack 5 don't shim nodejs modules anymore, so this would fail to bundle for them.

Describe the solution you'd like Refactor the code to avoid the util module, maybe with a custom implementation of the inherits function specifically, since that's the only utility used.

Describe alternatives you've considered Document that this library does not work without shimming nodejs modules.

Additional context Initially reported at https://github.com/sveltejs/kit/issues/2548. Related #37. May be related #52

Forked On 13 Aug 2022 at 02:02:18

Cymen

I had build problems with the above so I ended up rolling back our vite version for now (from v3 to v2.9).

I'm really surprised at the lack of maintenance of this module by Twilio. It's very disappointing.

Commented On 13 Aug 2022 at 02:02:18
Issue Comment

Cymen

[FEATURE] Avoid using nodejs modules

Is your feature request related to a problem? Please describe. The library is using the util module, which is a module from nodejs. Recent bundlers like Vite and Webpack 5 don't shim nodejs modules anymore, so this would fail to bundle for them.

Describe the solution you'd like Refactor the code to avoid the util module, maybe with a custom implementation of the inherits function specifically, since that's the only utility used.

Describe alternatives you've considered Document that this library does not work without shimming nodejs modules.

Additional context Initially reported at https://github.com/sveltejs/kit/issues/2548. Related #37. May be related #52

Forked On 12 Aug 2022 at 10:00:47

Cymen

@alexvdvalk I think your code sample got cut off however it was very helpful -- I ended up doing this as the (hopefully temporary) workaround:

const Device = (async () => {
  await import("@twilio/voice-sdk/dist/twilio.min.js");
  return window["Twilio"].Device;
})(); 

Commented On 12 Aug 2022 at 10:00:47
Issue Comment

Cymen

Update `react-router-dom` to v6

Is your feature request related to a problem? Please describe.

At this moment, the react-router-dom dependency is at v5. Sometimes, I get an error on vercel deployment because of the useHistory hook import, despite it shouldn't be a problem in v5:

../../node_modules/beautiful-react-hooks/esm/useQueryParam.js
Attempted import error: 'useHistory' is not exported from 'react-router-dom' (imported as 'useHistory'). 

Describe the solution you'd like It would be nice to update the react-router-dom dependency to v6, changing the useHistory hook to useNavigate: https://github.com/remix-run/react-router/blob/main/docs/getting-started/tutorial.md

Describe alternatives you've considered N/A

Additional context N/A

Forked On 12 Aug 2022 at 02:16:59

Cymen

If you're using vite and you run into this issue like so:

'useHistory' is not exported by ../node_modules/react-router-dom/index.js, imported by node_modules/beautiful-react-hooks/esm/useQueryParam.js
file: /Users/cymen/dev/surge/gondor/component-library/node_modules/beautiful-react-hooks/esm/useQueryParam.js:2:9
1: import { useCallback, useRef } from 'react';
2: import { useHistory } from 'react-router-dom';
            ^
3: import useDidMount from './useDidMount';
4: import useURLSearchParams from './useURLSearchParams'; 

The solution is to do as the README examples show and import the hooks like so:

import useGlobalEvent from "beautiful-react-hooks/useGlobalEvent"; 

Instead of:

import { useGlobalEvent } from "beautiful-react-hooks"; 

Commented On 12 Aug 2022 at 02:16:59

Cymen

started

Started On 11 Aug 2022 at 05:05:51

Cymen

started

Started On 10 Aug 2022 at 02:48:35
Issue Comment

Cymen

Is it possible to use .env files?

I have a project with a .env file in the root and I use import "dotenv/config"; to load the .env to process.env. I didn't realize it at first but this is not working with email/index.ts as the env values I'd expect to be defined (present in my .env) are not set on process.env.

Forked On 05 Aug 2022 at 06:42:50

Cymen

Sure, I'll send an email about my usage and adding dotenv by default sounds great!

Commented On 05 Aug 2022 at 06:42:50
Issue Comment

Cymen

Is it possible to use .env files?

I have a project with a .env file in the root and I use import "dotenv/config"; to load the .env to process.env. I didn't realize it at first but this is not working with email/index.ts as the env values I'd expect to be defined (present in my .env) are not set on process.env.

Forked On 05 Aug 2022 at 05:35:19

Cymen

I edited emails/index.ts to change the contents of a console.log and it's updating without restarting (wasn't sure if that would be the case) so I'd chalk this up to some kind of odd edge case.

I'll keep trying to reproduce as I use mailing but I'm fine with closing this out and can reopen if I can get it to happen again. Sorry for what amounts to noise at the moment.

On a side note, really happy to find mailing -- thank you for sharing it. I was already using MJML but had a email template compile step and previewing wasn't as nice as I'd like plus I wasn't using react-mjml yet as it didn't fit well in my workflow. But I'm excited to be able to use all of that and have the excellent preview capabilities of mailing!

Commented On 05 Aug 2022 at 05:35:19
Issue Comment

Cymen

Is it possible to use .env files?

I have a project with a .env file in the root and I use import "dotenv/config"; to load the .env to process.env. I didn't realize it at first but this is not working with email/index.ts as the env values I'd expect to be defined (present in my .env) are not set on process.env.

Forked On 05 Aug 2022 at 05:31:00

Cymen

I was actually adding the import "dotenv/config"; to the top of emails/index.ts (I kept writing email as the directory above but was tired last night -- I'm using the default locations).

Oddly enough today it is all working. I thought it was due to isolatedModules in my root tsconfig.json as mentioned in https://github.com/successor-software/mailing/issues/90 but I'm flipping that on and off and it doesn't make a difference now.

There isn't anything compiled/cached between npx mailing runs is there? If not, it seems like there was some kind of glitch yesterday that I'm not seeing at all today.

Commented On 05 Aug 2022 at 05:31:00
Issue Comment

Cymen

Using console.log in `email/index.ts` does not log anything

While digging into https://github.com/successor-software/mailing/issues/89 it was confusing to not be able to log anything from email/index.ts.

Forked On 05 Aug 2022 at 05:22:42

Cymen

I discovered that this is due to having "isolatedModules": true in my root tsconfig.json under compilerOptions. If I comment that out, the console logging works. I discovered this by running:

yarn ts-node -e 'console.log("test")' 

And if isolatedModules is enabled, there is an error message:

[eval].ts:1:1 - error TS1208: '[eval].ts' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module.

1 console.log("test")
  ~~~~~~~

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 

I don't get any error when running npx mailing but at least it makes sense! I only wanted this while figuring out https://github.com/successor-software/mailing/issues/89 so I'll close this as it seems out of scope of mailing although good to know.

Commented On 05 Aug 2022 at 05:22:42

Cymen

started

Started On 03 Aug 2022 at 06:17:13

Cymen

started

Started On 30 Jul 2022 at 06:43:39

Cymen

started

Started On 30 Jul 2022 at 06:14:56

Cymen

started

Started On 19 Jul 2022 at 07:25:46

Cymen

started

Started On 18 Jul 2022 at 05:56:09
Issue Comment

Cymen

Signing in using magic link with Outlook email when SafeLinks enabled does not work

Describe the bug Signing in with an Outlook email which is linked to an account where the SafeLinks premium feature is enabled does not work.

Another authentication library seems to have the same issue: https://github.com/FusionAuth/fusionauth-issues/issues/629. When this Outlook feature is enabled, the magic link is encapsulated by a SafeLinks Outlook protection URL, e.g.:

https://eur02.safelinks.protection.outlook.com/?url=<magic-link-url> 

From the issue in FusionAuth, it seems that the token gets invalidated because of some request that SafeLinks is being made beforehand. (Source: https://github.com/FusionAuth/fusionauth-issues/issues/629#issuecomment-629157742)

Steps to reproduce

  1. Sign in with Outlook email which has SafeLinks enabled
  2. Click on Sign link from email

Expected behavior User should be able to login

Screenshots or error logs None. The user gets redirected to /auth/sign-in?error=Verification

Additional context /

Feedback

  • [ ] Found the documentation helpful
  • [ ] Found documentation but was incomplete
  • [x] Could not find relevant documentation
  • [ ] Found the example project helpful
  • [ ] Did not find the example project helpful

Forked On 16 Jul 2022 at 01:33:59

Cymen

I ran into this problem and ended up adding a /api/ok endpoint that just returns HTTP 200 with "ok" as the body (and doesn't require authentication). Then I added this rewrite rule in the nginx configuration:

 if ($request_method = HEAD) {
      rewrite ^/api/auth/callback/email.* /api/ok last;
    } 

You of course might have to do something else and there might be some way to do this without adding the /api/ok route but I wanted that anyway.

Commented On 16 Jul 2022 at 01:33:59