Comments (5)
Hi,
Same issue
Log: (import in l. 4606 - var _uniq = require('underscore').uniq; )
vue.runtime.esm.js?2b0e:1888 TypeError: _uniq is not a function
at unique (jsonpath.js?52cd:4851)
at Handlers.subscript-child-union (jsonpath.js?52cd:4690)
at eval (jsonpath.js?52cd:5001)
at Array.forEach (<anonymous>)
at eval (jsonpath.js?52cd:4998)
at Array.forEach (<anonymous>)
at JSONPath.nodes (jsonpath.js?52cd:4992)
at JSONPath.query (jsonpath.js?52cd:4958)
at fetchJsonPathData (proccess.js?25a6:41)
at fetchData (proccess.js?25a6:24)
Can this issue been fixed ?
Regars
from jsonpath.
Of interest; a quick and probably non-comprehensive search only turned up _uniq as the only part of underscore being used. The bundle size could be kept to a minimum by simply bundling the lodash single-module equivalent lodash.uniqby.
(not to be confused with lodash.uniq, which does not accept the iterator function as the second argument)
from jsonpath.
Ooh, didn't see this... should have looked harder -.-. Surprised this import issue didn't get fixed for the last release...
A bit more info on a reproducable use case in this issue that i just closed: #88
The unit tests could do with being run on these bundled files.
Looks like the issue here: https://github.com/dchester/jsonpath/blob/master/Gruntfile.js#L33
Browserify is ignoring all these dependencies but the source always assumes that they exist.
Another one (seperate issue though) is "fs" which has a check for "readFileSync"
https://github.com/dchester/jsonpath/blob/master/lib/grammar.js#L101
But the actual require itself fails in the browser.
https://github.com/dchester/jsonpath/blob/master/lib/grammar.js#L2
from jsonpath.
I am having this issue as well, any ideas on how to solve it
from jsonpath.
Please fix this issue. It would be better to remove underscore library dependency and write a function in it's place.
from jsonpath.
Related Issues (20)
- Updating the version of static-eval used in jsonpath
- output of stringify function not compatible with query function HOT 1
- require.resolve in aesprim.js seems to be throwing an error
- SQL/JSONPath support HOT 1
- F HOT 1
- Path containing Chinese appears to be unable to extract results
- Unable to use jsonpath with browserify HOT 3
- cannot bundle with CDK/esbuild and use in AWS Lambda HOT 6
- Struggling with "update or create in array" functionality HOT 4
- `jp.parent(o, failingPath)` throws meaningless error
- jp.value doesn't always work
- Error: Can't walk dependency graph: Cannot find module '..' HOT 1
- Cannot use typeof inside filter script
- Found a possible security concern
- Project is failing snyk scans due to SNYK-JS-WORDWRAP-3149973
- `.apply` skips the last path HOT 7
- obj needs to be an object
- member-child-identifier parse wrong !
- Consider implementing RFC 9535 HOT 1
- Square brackets & double quotes in keys
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsonpath.