-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Angular 10 CommonJS Warning and Module Not Found Errors #35
Comments
This is probably related to Webpack 5. See: https://blog.sindresorhus.com/webpack-5-headache-b6ac24973bf1 I would recommend asking on https://github.com/webpack/webpack/issues or https://github.com/angular/angular/issues instead. |
@sindresorhus that's weird since I am using Angular 10.2.0, Webpack 4.44.1 If I am right. I was looking at the package.json of webpack module itself in node_modules/webpack which was 4.44.1. So unless I was looking at the wrong part I don't know why this would be an issue then?? I even went ahead and test it with Angular 9 and this is still the case any ideas? |
Regardless, this is not the place to ask build-specific questions. This is a problem with the Angular builder or the config you use with it. |
Hi, I have found out why this is not working in Angular, this is because it is using require which is not supported in browsers. Is it possible to change the documentation and mention that the provided code cannot be used client side since it doesn't support require and can only be used server side. That way you won't have other users asking why they can't use it client side. It should be possible though to use Requirejs to replace the server side Require, but I don't know how to do this and I can't figure it out for an Angular project. Anyways I was hoping to use this in my Angular project for a device management system but since this was the only module left to explore for an easy to use setup. Guess I'll have to do some back and forth configuring then, so I can make it work. Thanks for the help! |
This module only works in Node, there's no sense in trying to make it work in browsers. See #32 for possible browser support. |
So I have setup a new test project to see how this works. Now the clean build well worked as expected, but when adding this module and add the code in I received following messages:
This is how my component looks like:
Even if I were to move this it still gives those errors, any ideas on how to solve them??
Thanks in Advance!
The text was updated successfully, but these errors were encountered: