Giter Club home page Giter Club logo

Comments (5)

sindresorhus avatar sindresorhus commented on July 18, 2024

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.

from internal-ip.

BillyCottrell avatar BillyCottrell commented on July 18, 2024

@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?

from internal-ip.

sindresorhus avatar sindresorhus commented on July 18, 2024

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.

from internal-ip.

BillyCottrell avatar BillyCottrell commented on July 18, 2024

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!

from internal-ip.

silverwind avatar silverwind commented on July 18, 2024

This module only works in Node, there's no sense in trying to make it work in browsers. See #32 for possible browser support.

from internal-ip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.