jsonpath icon indicating copy to clipboard operation
jsonpath copied to clipboard

Unable to use jsonpath with browserify

Open EarthyOrange opened this issue 3 years ago • 3 comments

[13:59:51] Browserify error: Can't walk dependency graph: Cannot find module '..' from '.../node_modules/jsonpath'
    required by .../node_modules/jsonpath/jsonpath.js
[13:59:51] Browserify error: Can't walk dependency graph: Cannot find module './dict' from '.../node_modules/jsonpath'
    required by .../node_modules/jsonpath/jsonpath.js
[13:59:51] Browserify error: Can't walk dependency graph: Cannot find module './aesprim' from '.../node_modules/jsonpath'
    required by .../node_modules/jsonpath/jsonpath.js
[13:59:51] Browserify error: Can't walk dependency graph: Cannot find module './slice' from '.../node_modules/jsonpath'
    required by .../node_modules/jsonpath/jsonpath.js
[13:59:51] Browserify error: Can't walk dependency graph: Cannot find module './handlers' from '.../node_modules/jsonpath'
    required by .../node_modules/jsonpath/jsonpath.js
[13:59:51] Browserify error: Can't walk dependency graph: Cannot find module './grammar' from '.../node_modules/jsonpath'
    required by .../node_modules/jsonpath/jsonpath.js
[13:59:51] Browserify error: Can't walk dependency graph: Cannot find module './parser' from '.../node_modules/jsonpath'
    required by .../node_modules/jsonpath/jsonpath.js
[13:59:52] Browserify error: Can't walk dependency graph: Cannot find module './support/isBuffer' from '.../node_modules/jsonpath'
    required by .../node_modules/jsonpath/jsonpath.js

I ran in to an issue with browserify and jsonpath. The issue seems to be that the paths to modules in the require statments in the jsonpath.js file (https://github.com/dchester/jsonpath/blob/master/jsonpath.js#L5117) seem to be incorrect.

EarthyOrange avatar Nov 09 '21 00:11 EarthyOrange

Hi @EarthyOrange ! I'm also having this same issue. Did you manage to find a workaround for it?

carlosjrtee avatar Jul 13 '22 03:07 carlosjrtee

@carlosjrtee No, I haven't yet. Did you manage to resolve it in the meantime?

EarthyOrange avatar Oct 03 '22 19:10 EarthyOrange

@EarthyOrange I ended up adding jsonpath source files to my project directly, without using npm.

carlosjrtee avatar Oct 04 '22 01:10 carlosjrtee