dchester / jsonpath

Query and manipulate JavaScript objects with JSONPath expressions. Robust JSONPath engine for Node.js.
MIT License
1.35k stars 216 forks source link

require.resolve in aesprim.js seems to be throwing an error #162

Open JaredAAT opened 3 years ago

JaredAAT commented 3 years ago

When running an AWS lambda using node v12.22.3 (npm v6.14.13), it seems that jsonpath is causing an error with: require.resolve is not a function.

It seems aesprim.js is maybe the culprit, going off of https://github.com/nodejs/node/issues/27583.

using node v12.21.0 doesn't seem to cause this error.

My code is very minimal:

'use strict';

const jp = require('jsonpath');

That seems enough to cause the error