https://pulumi.com logo
#general
Title
# general
b

better-rainbow-14549

08/07/2019, 4:06 PM
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

white-balloon-205

08/07/2019, 4:08 PM
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

better-rainbow-14549

08/07/2019, 4:09 PM
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

white-balloon-205

08/07/2019, 4:13 PM
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

better-rainbow-14549

08/07/2019, 4:14 PM
ah :S
ok thanks for the info
t

tall-librarian-49374

08/07/2019, 4:16 PM
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

better-rainbow-14549

08/07/2019, 4:19 PM
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

tall-librarian-49374

08/07/2019, 4:23 PM
Btw, azuread doesn't depend on those packages
You mean
ms-rest-js
was contributing to the issue?
b

better-rainbow-14549

08/07/2019, 4:24 PM
until i added that it didnt compile yeah
it was a hail mary from the linked azure issue fix
t

tall-librarian-49374

08/07/2019, 4:26 PM
but the latest versions are referencing
"@azure/ms-rest-js": "^2.0.4",
🧐
b

better-rainbow-14549

08/07/2019, 4:27 PM
maybe that was matching a 2.0.<4 ?
i'm not an expert on things like this
t

tall-librarian-49374

08/07/2019, 4:27 PM
I'd have a look at your lock file when you had this problem
b

better-rainbow-14549

08/07/2019, 4:29 PM
i'll have a proper look tomorrow thanks
EOD here thanks again