Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traverson not working with Create React App v5 applications #239

Open
ramirez opened this issue Jun 22, 2022 · 1 comment
Open

Traverson not working with Create React App v5 applications #239

ramirez opened this issue Jun 22, 2022 · 1 comment

Comments

@ramirez
Copy link

ramirez commented Jun 22, 2022

Describe the bug
After upgrading to v5 of CRA, which uses a new version of WebPack, my application build fails because the module 'vm' is not present.

To Reproduce
Steps to reproduce the behavior:

npx create-react-app my-app
cd my-app
npm install traverson

edit src/App.js

# add `import traverson from "traverson";` on top of the file

npm start

shows the following error:

ERROR in ./node_modules/jsonpath-plus/lib/jsonpath.js 43:20-33

Module not found: Error: Can't resolve 'vm' in '/Users/workspace/experiments/my-app/node_modules/jsonpath-plus/lib'

According to an issue in the jsonpath-plus repo (JSONPath-Plus/JSONPath#129) , the problem should be solved in versions 5.0.0 and up. As of 8.0.2, traverson uses jsonpath-plus v0.16.0. Upgrading to v5.0.0 should solve the problem

Node.js (please complete the following information):

  • OS: MacOS 10.14, Linux distro]
  • Node.js version:
  • Traverson Version: 8.0.2

Browser/Desktop (please complete the following information):

  • OS: MacOS 12.4
  • Traverson Version: 8.0.2
@bakhtizin
Copy link

I have a similar issue with Traverson Version: 8.0.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants