Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

Typescript error when build the project #212

Closed
ravenboilinux opened this issue Oct 6, 2016 · 4 comments
Closed

Typescript error when build the project #212

ravenboilinux opened this issue Oct 6, 2016 · 4 comments

Comments

@ravenboilinux
Copy link

Category

[ ] Enhancement

[X ] Bug

[ ] Question

Expected / Desired Behavior / Question

Gulp should build the typescript completely

Observed Behavior

Everytime I build the my project that use the pnp framework i get this error
[14:59:47] ==================[ Finished ]==================
Error - typescript - node_modules\sp-pnp-js\lib\net\httpclient.d.ts(3,15): error
TS2304: Cannot find name 'HeaderInit'.
Error - typescript - node_modules\sp-pnp-js\lib\net\httpclient.d.ts(6,12): error
TS2304: Cannot find name 'BodyInit'.
Error - typescript - node_modules\sp-pnp-js\lib\net\httpclient.d.ts(7,21): error
TS2304: Cannot find name 'RequestMode'.
Error - typescript - node_modules\sp-pnp-js\lib\net\httpclient.d.ts(8,28): error
TS2304: Cannot find name 'RequestCredentials'.
Error - typescript - node_modules\sp-pnp-js\lib\net\httpclient.d.ts(9,22): error
TS2304: Cannot find name 'RequestCache'.
Error - typescript - node_modules\sp-pnp-js\lib\net\httpclient.d.ts(15,57): erro
r TS2304: Cannot find name 'Response'.
Error - typescript - node_modules\sp-pnp-js\lib\net\httpclient.d.ts(16,60): erro
r TS2304: Cannot find name 'Response'.
Error - typescript - node_modules\sp-pnp-js\lib\net\httpclient.d.ts(17,55): erro
r TS2304: Cannot find name 'Response'.
Error - typescript - node_modules\sp-pnp-js\lib\net\httpclient.d.ts(18,56): erro
r TS2304: Cannot find name 'Response'.
Error - typescript - node_modules\sp-pnp-js\lib\net\httpclient.d.ts(23,47): erro
r TS2304: Cannot find name 'Response'.
Error - typescript - node_modules\sp-pnp-js\lib\sharepoint\rest\caching.d.ts(20,
21): error TS2304: Cannot find name 'Response'.
Error - typescript - node_modules\sp-pnp-js\lib\sharepoint\rest\items.d.ts(155,2
8): error TS2304: Cannot find name 'Response'.
Error - typescript - node_modules\sp-pnp-js\lib\sharepoint\rest\odata.d.ts(4,14)
: error TS2304: Cannot find name 'Response'.
Error - typescript - node_modules\sp-pnp-js\lib\sharepoint\rest\odata.d.ts(7,14)
: error TS2304: Cannot find name 'Response'.
Error - typescript - node_modules\sp-pnp-js\lib\sharepoint\rest\odata.d.ts(12,14
): error TS2304: Cannot find name 'Response'.
Error - 'typescript' sub task errored after 3.83 s
"TypeScript error(s) occurred."

Steps to Reproduce

  1. npm install sp-pnp-js --save
  2. run gulp
@patrick-rodgers
Copy link
Contributor

Thanks for reporting this, I just started noticing this myself - which makes me think something changed in a dependency. Will take a look.

@okaufmann
Copy link

Same here, built with webpack...

@okaufmann
Copy link

When I add the following line to typings.json it builds.

"whatwg-fetch": "github:DefinitelyTyped/DefinitelyTyped/whatwg-fetch/whatwg-fetch.d.ts#9027703c0bd831319dcdf7f3169f7a468537f448"

whatwg-fetch was removed in a previous commit, so this could be the source of the problem:
41bf538

Hope this helps.

@patrick-rodgers
Copy link
Contributor

Closing this based on #215. Documentation updates pending in wiki

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants