-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
Error in angular prod build #129
Comments
I think we'll need a separate builds, one for Node and one for others, to avoid these kind of static analysis problems--I think React Native may have such an issue as well, IIRC. |
I have made a new build of JSONPath which I hope may fix this issue. Could you see if it works in temporarily setting this in your
...and then running again a local If you can test this, I can see about pushing it as a new release. If that doesn't work (or if you set module.exports = {
//...
resolve: {
aliasFields: ['browser']
}
}; If that doesn't work, or if you are using module.exports = {
//...
resolve: {
mainFields: ['browser', 'module', 'main']
}
}; If it still doesn't work, I'd probably need to have a minimal reproduction repo prepared with a simple Webpack config that reproduces the problem (I'm not deeply familiar with Webpack, but having a minimal test repo should help). If it works, please also let us know what, if any, changes you had to make. Thanks! |
Hi, thanks a lot for this update! I'm currently on vacation. But I'm happy to test this out, once I'm back. |
When is this getting fixed? Do we have a date? |
@frothenberger : Are you going to take a look? @abhishekarun : if you can confirm the PR (#130) is working on Angular, I'm happy to merge. |
@brettz9 I have tested angular app with your changes and still facing the issue. |
@jainanuj0812 : Thank you... Could you give the exact error message (you can leave out the first part of your own paths, but keep the |
I was able to build by adding the following to my angular project's package.json
|
@varubi : If you are speaking about adding that directive against PR #130 (or if you can test your code against that PR), it should really help us going into the future if you might be able to indicate the exact error message you get (including listing the path into |
Any update? I am getting this error also in dev mode (Angular 10)- [ERROR] ERROR in ./node_modules/jsonpath-plus/dist/index-es.js |
Same error in Angular 10 for me as well, any solution for this? |
@bgBond and @toamitc : Please read the comments above starting at #129 (comment) and continuing on to the end. |
To reproduce the problem please follow these steps: npm install -g @angular/cli Then add the following two lines at the top of app.component.ts And then run... I hope this helps. |
@papadi please note that our package is However, your instructions on how to quickly set up an angular app and reproduce kindly helped me confirm my latest fixes just now are working. Released as v5.0.0. Thanks very much! |
I tried using this library with angular 9.1.11.
The serve:dev works fine, but the prod build fails because the module 'vm' is not present.
ERROR in ./node_modules/jsonpath-plus/dist/index-es.js Module not found: Error: Can't resolve 'vm' in '/Users/froth/Documents/Repositories/medusa/login-ui/node_modules/jsonpath-plus/dist' resolve 'vm' in '/Users/froth/Documents/Repositories/medusa/login-ui/node_modules/jsonpath-plus/dist' Parsed request is a module using description file: /Users/froth/Documents/Repositories/medusa/login-ui/node_modules/jsonpath-plus/package.json (relative path: ./dist) Field 'browser' doesn't contain a valid alias configuration
Is there a way to fix this (e.g. suppress this dependency)?
The text was updated successfully, but these errors were encountered: