You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cannot bundle with CDK/esbuild and use in AWS Lambda #168
It seems like esbuild is shaking off the include folder. That being said, can you guys create a repro project with esbuild and the input that is creating this problem? I can look in to it and attempt a fix.
Would you mind to take a look on this issue and the proposed fix #172@dchester?
There are large players using your library as their dependency, I'm currently getting issues through contentful-export being dependent on this library.
Maintaining open-source library aside from your daily job is probably huge hassle, maybe it would be worth to consider picking some of the helpful fellows from active PR openers as contributors with a merge rights?
I just ran into this issue, and converted to jsonpath-plus. For my application, it was a drop-in replacement that does not suffer from this behavior. A coworker indicated that the esbuild "dynamic modules" plugin is now deprecated and presumably intrinsically supports dynamically loaded modules in newer versions (24.x as of now). So this may be fixed and therefore jsonpath might work, though did not investigate that approach.
One thing to consider, jsonpath-plus is no longer actively maintained. That could present issues in the future.
BTW, I am specifically using a JSON path to navigate to a child-object based on a root object from which the JSON path is derived. For me the issue was an AWS CDK deployment that uses esbuild under the hood. I received warnings during deployment about those dynamic loaded modules in jsonpath, then module-not-found errors once running in the Lambda in the cloud.
Activity
askluke commentedon Apr 12, 2022
Same problem here. Any quick fixes for this?
EarthyOrange commentedon Sep 23, 2022
Was a fix for this issue found?
It seems like esbuild is shaking off the
includefolder. That being said, can you guys create a repro project with esbuild and the input that is creating this problem? I can look in to it and attempt a fix.pveller commentedon Sep 30, 2022
I just switched to https://github.com/JSONPath-Plus/JSONPath
xgpayfit commentedon Jan 16, 2023
Hi ! It's shaked off because both files in the missing "include" folder are required dynamically (no static require / import from) :
https://github.com/dchester/jsonpath/blob/master/lib/grammar.js#L102
This syntax forbids all usage of this library with a bundler (esbuild, webpack, nx, ...) that uses tree shaking...
brianorwhatever commentedon Jun 14, 2023
this dynamic import needs to be fixed it breaks a lot of things
j-flat commentedon Jun 28, 2024
Would you mind to take a look on this issue and the proposed fix #172 @dchester?
There are large players using your library as their dependency, I'm currently getting issues through contentful-export being dependent on this library.
Maintaining open-source library aside from your daily job is probably huge hassle, maybe it would be worth to consider picking some of the helpful fellows from active PR openers as contributors with a merge rights?
mgoulet101 commentedon Oct 16, 2024
I just ran into this issue, and converted to jsonpath-plus. For my application, it was a drop-in replacement that does not suffer from this behavior. A coworker indicated that the esbuild "dynamic modules" plugin is now deprecated and presumably intrinsically supports dynamically loaded modules in newer versions (24.x as of now). So this may be fixed and therefore jsonpath might work, though did not investigate that approach.
One thing to consider, jsonpath-plus is no longer actively maintained. That could present issues in the future.
BTW, I am specifically using a JSON path to navigate to a child-object based on a root object from which the JSON path is derived. For me the issue was an AWS CDK deployment that uses esbuild under the hood. I received warnings during deployment about those dynamic loaded modules in jsonpath, then module-not-found errors once running in the Lambda in the cloud.