tj / node-prune

Remove unnecessary files from node_modules (.md, .ts, ...)
MIT License
4.41k stars 130 forks source link

Doesn't work with angular-cli generated projects #18

Open NelsonBrandao opened 6 years ago

NelsonBrandao commented 6 years ago

Any project generated by angular-cli fails to build after running node-prune

Steps to reproduce:

  1. Install angular-cli
  2. Run ng new random-project
  3. Navigate inside the newly created project folder
  4. Run yarn
  5. Run node-prune
  6. Run ng serve

It will fail to build the project

Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
    at createSourceFile ((...)/node_modules/typescript/lib/typescript.js:14876:109)
(...)
deissh commented 6 years ago

At me all works, at you what version?

maxime1992 commented 6 years ago

It's working for me, but then when I run ng serve I end up with errors which is not really surprising according to the README:

node-prune is a small tool to prune unnecessary files from ./node_modules, such as markdown, typescript source files

How should we be able to work with Typescript without that?

tj commented 6 years ago

It's (currently) meant more for deployments etc