Coder Social home page Coder Social logo

Comments (8)

bcherny avatar bcherny commented on July 28, 2024

Did you run npm install?

from ngcomponent.

tlvince avatar tlvince commented on July 28, 2024

This appears to be because lodash is being loaded via named imports on from 'lodash', whereas the package depends on the per-method packages.

#20

from ngcomponent.

tlvince avatar tlvince commented on July 28, 2024

Fixing the imports (import some from 'lodash.some' etc.) throws index.ts(1,8): error TS1192: Module '"/ngcomponent/node_modules/@types/lodash.some/index"' has no default export.. Any ideas?

from ngcomponent.

bcherny avatar bcherny commented on July 28, 2024

How do I reproduce the issue you're seeing? If this is master, it works fine on my machine and on CI - https://circleci.com/gh/coatue-oss/ngcomponent/166

from ngcomponent.

tlvince avatar tlvince commented on July 28, 2024

The issue is lodash is pulled in by another devDependency. Can you try rm -rf node_modules/lodash or try this package-lock.json?

NB, I triggered this by using ngcomponent as a dependency in another package and running npm i --production.

from ngcomponent.

meganwalker-ibm avatar meganwalker-ibm commented on July 28, 2024

We've hit a similar issue that we think is caused by this.

We have lodash included via another devDependency; and because it's using the named imports with from lodash when webpacking it bundles the entirety of lodash in our bundle, inflating our production bundle size significantly.

I suspect that should the linked PR be merged (or an alternative used that imports only the specific bits) this would be resolved for us.

from ngcomponent.

bcherny avatar bcherny commented on July 28, 2024

Before we merge anything, I'd like to make the sure diagnosis is correct. I am not able to reproduce this issue on my end. @meganwalker-ibm @tlvince Can one of you post a self-container repro case.

from ngcomponent.

bcherny avatar bcherny commented on July 28, 2024

Closing for inactivity. @tlvince @meganwalker-ibm feel free to reopen if this is still an issue and you can provide specific steps so that I can reproduce this issue.

from ngcomponent.

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.