You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A bug: please describe the error that you encountered
We use a slightly customized setup because we only ever have one library in each repo. So instead of the projects subfolder, we simply use the root of the repo as the project folder.
So instead of /projects/my-lib/src we simply put our library in /src. This has worked fine until we upgraded Angular from v12 to v14.
Now when we build (our destination folder is /lib, not the default /dest), our output folder contains a node_modules folder, which contains a folder for what appears to be each of our dev dependencies and all the downstream dependencies, but those folders contain only README.md and nothing else.
How To Reproduce
A bug: please include instructions how to reproduce. Issues without reproduction are likely to receive no feedback.
ng new my-workspace --no-create-application`cd my-workspaceng generate library my-lib
Move the contents of projects/my-lib (except package.json and README.md) into the root of the repo
Open the root package.json, change the name to my-lib, remove all the dependencies and add angular/rxjs as peerDependencies and add necessary devDependencies from projects/my-lib:
Update destination folder and schema for ng-package.json (remove ../.. so it's just ./node_modules/... and set dest to lib/
Update all the tsconfig.* files to reference e.g. ./tsconfig.json
Run ng build --configuration production
At this point, there will be a lib folder containing the build, which also contains a node_modules folder with a bunch of README.md files in it
Expected Behaviour
A bug: please describe what behaviour or result you expected
Before upgrading to Angular v14 the output folder did not contain this node_modules folder full of READMEs. Before changing the source and destination folders, running build produces a clean dist folder without this node_modules folder.
My guess is either the node_modules folder (and only the markdown files inside it) are erroneously being copied into the destination or the full node_modules folder is copied over and later cleaned up but there's an issue with removing the README files.
Type of Issue
Description
A bug: please describe the error that you encountered
We use a slightly customized setup because we only ever have one library in each repo. So instead of the
projects
subfolder, we simply use the root of the repo as the project folder.So instead of
/projects/my-lib/src
we simply put our library in/src
. This has worked fine until we upgraded Angular from v12 to v14.Now when we build (our destination folder is
/lib
, not the default/dest
), our output folder contains anode_modules
folder, which contains a folder for what appears to be each of our dev dependencies and all the downstream dependencies, but those folders contain onlyREADME.md
and nothing else.How To Reproduce
A bug: please include instructions how to reproduce. Issues without reproduction are likely to receive no feedback.
Reproduction based on below steps is here
Move the contents of
projects/my-lib
(except package.json and README.md) into the root of the repoOpen the root
package.json
, change the name tomy-lib
, remove all thedependencies
and add angular/rxjs as peerDependencies and add necessary devDependencies fromprojects/my-lib
:Update
angular.json
paths:./
./src
./tsconfig.lib.json
./ng-package.json
./tsconfig.lib.prod.json
ng-package.json
(remove ../.. so it's just./node_modules/...
and setdest
tolib/
./tsconfig.json
ng build --configuration production
At this point, there will be a
lib
folder containing the build, which also contains a node_modules folder with a bunch of README.md files in itExpected Behaviour
A bug: please describe what behaviour or result you expected
Before upgrading to Angular v14 the output folder did not contain this
node_modules
folder full of READMEs. Before changing the source and destination folders, running build produces a cleandist
folder without thisnode_modules
folder.My guess is either the node_modules folder (and only the markdown files inside it) are erroneously being copied into the destination or the full node_modules folder is copied over and later cleaned up but there's an issue with removing the README files.
Version Information
Please include all version numbers that might be relevant, e.g. third-party libraries
The text was updated successfully, but these errors were encountered: