Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix: detect node on react-native environments#87

Closed
simon-scherzinger wants to merge 1 commit into
JSONPath-Plus:masterJSONPath-Plus/JSONPath:masterfrom
entrecode:masterentrecode/JSONPath:masterCopy head branch name to clipboard
Closed

fix: detect node on react-native environments#87
simon-scherzinger wants to merge 1 commit into
JSONPath-Plus:masterJSONPath-Plus/JSONPath:masterfrom
entrecode:masterentrecode/JSONPath:masterCopy head branch name to clipboard

Conversation

@simon-scherzinger

@simon-scherzinger simon-scherzinger commented Sep 12, 2018

Copy link
Copy Markdown

This PR will fix JSONPath plus for react-native.

Currently it will fail since vm is not available in react-native. When bundling JavaScript for react-native it will try to find vm without success (see change in package.json).

During runtime it will fail since detecting of node will also be true in react-native (see change in lib/jsonpath.js)

Take care,

Simon

Comment thread package.json
},
"react-native": {
"vm": false
},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If React-Native doesn't support vm anyhow, what does this do?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will tell reacts module bundling not to look for the vm module. Even though the module will not be used during runtime the bundler is still trying to find it.

@brettz9 brettz9 added the Bug label Oct 19, 2018
@brettz9

brettz9 commented Oct 20, 2018

Copy link
Copy Markdown
Collaborator

I think I sometimes fail to get notifications for code comments, so just a ping to let you know I made a comment and would be happy to pull this if you could answer the question.

@brettz9 brettz9 closed this in a52dd41 Oct 20, 2018
@brettz9

brettz9 commented Oct 20, 2018

Copy link
Copy Markdown
Collaborator

Incorporated into master and released in version v0.18.0...thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.