Closed danielzgtg closed 1 year ago
I can indeed reproduce locally with ng 14.2, but strangely enough the CI will pass all tests with ng 14, 15 and node 16, 18. I am not quite sure where to go from there, so any help would be appreciated...
I would downgrade the node version to 16. node 18 support starts with Angular 15.
I have moved on to Angular 15 and Node 19.1.0. I can't downgrade my node at all. I have a lot of packages installed globally on my desktop, and my automated scripts assume there will only be one version installed in nvm. My own code also assumes Node is always the latest and will freely depend on latest API. Basically if I touch the version I might not even be able to log in anymore, similar to last time I changed my version of rust and ls
and git
subcommands stopped working. I would rather manually add the packages using npm i
.
I narrowed down the reproduction to just ng g apollo-angular:ng-add
. This will allow for faster testing. Attempting to work around this with ts-node
gave an import error. I see there is schematics/install/index.ts
.
Publishing .ts
files to npm is considered harmful:
Other packages do not include .ts
files in their packages published to npm. .d.ts
files are fine as they don't run. @angular/cdk
makes sure to compile their index.ts
file into index.js
before publishing. The root cause of our problems in this issue is that we need to also transpiling apollo-angular's index.ts
into index.js
.
Then it seems it is related to https://github.com/kamilkisiela/apollo-angular/discussions/1852
@kamilkisiela can you share something on why sources were included in the latest release ? was it a mistake ?
Solved in 4.2.0
Describe the bug
ng add apollo-angular
crashes even on a new project.This seems to be a regression in v4 after #1760 fixed it in v3. No, this is Angular 14 so it's not the Angular 15 issue.
To Reproduce Steps to reproduce the behavior:
ng new test123
cd test123
ng add apollo-angular
Expected behavior
It should finish without printing errors.
None of the other things I've added to other projects using
ng add
have crashed with this setup.Environment: