is the @pulumi/azure 19.4 broken? it seems to rely...
# general
b
is the @pulumi/azure 19.4 broken? it seems to rely on @azure/ms-rest-js and its throwing all sorts of errors
Copy code
node_modules/@azure/ms-rest-js/es/lib/fetchHttpClient.d.ts:7:72 - error TS2304: Cannot find name 'RequestInit'.

7     abstract prepareRequest(httpRequest: WebResource): Promise<Partial<RequestInit>>;
                                                                         ~~~~~~~~~~~

node_modules/@azure/ms-rest-js/es/lib/fetchHttpClient.d.ts:9:27 - error TS2304: Cannot find name 'RequestInfo'.

9     abstract fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
                            ~~~~~~~~~~~

node_modules/@azure/ms-rest-js/es/lib/fetchHttpClient.d.ts:9:47 - error TS2304: Cannot find name 'RequestInit'.

9     abstract fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
                                                ~~~~~~~~~~~

node_modules/@azure/ms-rest-js/es/lib/fetchHttpClient.d.ts:9:69 - error TS2304: Cannot find name 'Response'.

9     abstract fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
                                                                      ~~~~~~~~

node_modules/@azure/ms-rest-js/es/lib/fetchHttpClient.d.ts:11:47 - error TS2304: Cannot find name 'Headers'.

11 export declare function parseHeaders(headers: Headers): HttpHeaders;
                                                 ~~~~~~~

node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.d.ts:7:18 - error TS2304: Cannot find name 'RequestInfo'.

7     fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
                              ~~~~~

node_modules/@azure/ms-rest-js/es/lib/webResource.d.ts:26:43 - error TS2304: Cannot find name 'Event'.

26     onabort: ((this: AbortSignalLike, ev: Event) => any) | null;
                                             ~~~~~

node_modules/@azure/ms-rest-js/es/lib/webResource.d.ts:27:77 - error TS2304: Cannot find name 'Event'.

27     addEventListener: (type: "abort", listener: (this: AbortSignalLike, ev: Event) => any, options?: any) => void;
                                                                               ~~~~~

node_modules/@azure/ms-rest-js/es/lib/webResource.d.ts:28:80 - error TS2304: Cannot find name 'Event'.

28     removeEventListener: (type: "abort", listener: (this: AbortSignalLike, ev: Event) => any, options?: any) => void;
                                                                                  ~~~~~


Found 13 errors.
w
The package itself is not broken, but there were several breaking changes made by things it depends on (built by Microsoft) unfortunately. The latest versions of the package force new versions of the dependencies to get around their breaking changes. You may need to enforce specific stronger constraints on the versions of those dependencies to work around their breaking changes.
b
i dont have any other dependencies except pulumi i dont think?
Copy code
"@pulumi/azure": "^0.19.4",
        "@pulumi/azuread": "^0.18.3",
        "@pulumi/kubernetes": "^0.25.5",
        "@pulumi/pulumi": "^0.17.28",
        "@pulumi/random": "^0.5.6",
azuread conflicting with it perhaps?
w
Right - these are transitive dependencies. Here;s the first break they made: https://github.com/Azure/ms-rest-nodeauth/issues/69 And then after they fixed that they made another accidental semver breaking change 😞. The latest code in
@pulumi/azure
works around this, but I'm actually not precisely sure which versions are safe. If someone can suggest safe versions compatible with the semver ranges above, you can
npm install @azure/ms-rest-azure-js@1.3.8
and similar for
ms-rest-nodeauth
cc @tall-librarian-49374
b
ah :S
ok thanks for the info
t
ms-rest-azure-js 1.3.8 goes with ms-rest-nodeauth 2.0.4
ms-rest-azure-js 2.0.1 with ms-rest-nodeauth 3.0.1
b
hm i get the same 13 errors with all those combinations
Copy code
"@azure/ms-rest-azure-js": "2.0.1",
        "@azure/ms-rest-nodeauth": "3.0.1",
        "@azure/ms-rest-js": "^1.8.13"
ah that worked
cheers
t
Btw, azuread doesn't depend on those packages
You mean
ms-rest-js
was contributing to the issue?
b
until i added that it didnt compile yeah
it was a hail mary from the linked azure issue fix
t
but the latest versions are referencing
"@azure/ms-rest-js": "^2.0.4",
🧐
b
maybe that was matching a 2.0.<4 ?
i'm not an expert on things like this
t
I'd have a look at your lock file when you had this problem
b
i'll have a proper look tomorrow thanks
EOD here thanks again