Closed joselarios closed 7 years ago
Hi @joselarios. Yes you can still run your web part with gulp serve. Can you send me here your compilation issues ? Thanks
Hi Olivier,
I receive the following response after running gulp serve:
[19:05:55] Finished subtask 'sass' after 1.71 s
[19:05:55] Starting subtask 'tslint'...
[19:05:55] Starting subtask 'typescript'...
[19:05:55] [typescript] Using custom version: 2.2.1
[19:05:58] Error - typescript - node_modules/@microsoft/sp-http/lib/httpClient/HttpClientResponse.d.ts(17,22): error TS2420: Class 'HttpClientResponse' incorrectly implements interface 'Response'.
[19:05:58] Error - typescript - node_modules/@types/whatwg-fetch/index.d.ts(6,15): error TS2300: Duplicate identifier 'Request'.
[19:05:58] Error - typescript - node_modules/@types/whatwg-fetch/index.d.ts(21,2): error TS2403: Subsequent variable declarations must have the same type. Variable 'headers' must be of type 'any', but here has type 'string[] | Headers | { [index: string]: string; }'.
[19:05:58] Error - typescript - node_modules/@types/whatwg-fetch/index.d.ts(23,2): error TS2403: Subsequent variable declarations must have the same type. Variable 'mode' must be of type 'string', but here has type 'RequestMode'.
[19:05:58] Error - typescript - node_modules/@types/whatwg-fetch/index.d.ts(24,2): error TS2403: Subsequent variable declarations must have the same type. Variable 'redirect' must be of type 'string', but here has type 'RequestRedirect'.
[19:05:58] Error - typescript - node_modules/@types/whatwg-fetch/index.d.ts(25,2): error TS2403: Subsequent variable declarations must have the same type. Variable 'credentials' must be of type 'string', but here has type 'RequestCredentials'.
[19:05:58] Error - typescript - node_modules/@types/whatwg-fetch/index.d.ts(26,2): error TS2403: Subsequent variable declarations must have the same type. Variable 'cache' must be of type 'string', but here has type 'RequestCache'.
[19:05:58] Error - typescript - node_modules/@types/whatwg-fetch/index.d.ts(48,15): error TS2300: Duplicate identifier 'Headers'.
[19:05:58] Error - typescript - node_modules/@types/whatwg-fetch/index.d.ts(60,2): error TS2687: All declarations of 'bodyUsed' must have identical modifiers.
[19:05:58] Error - typescript - node_modules/@types/whatwg-fetch/index.d.ts(69,15): error TS2300: Duplicate identifier 'Response'.
[19:05:58] Error - typescript - node_modules/@types/whatwg-fetch/index.d.ts(85,2): error TS2687: All declarations of 'status' must have identical modifiers.
[19:05:58] Error - typescript - node_modules/@types/whatwg-fetch/index.d.ts(87,2): error TS2403: Subsequent variable declarations must have the same type. Variable 'headers' must be of type 'any', but here has type 'HeaderInit'.
[19:05:58] Error - typescript - node_modules/@types/whatwg-fetch/index.d.ts(91,14): error TS2300: Duplicate identifier 'BodyInit'.
[19:05:58] Error - typescript - node_modules/@types/whatwg-fetch/index.d.ts(92,14): error TS2300: Duplicate identifier 'RequestInfo'.
[19:05:58] Error - typescript - node_modules/@types/whatwg-fetch/index.d.ts(98,13): error TS2300: Duplicate identifier 'fetch'.
[19:05:58] Error - typescript - __lib.d.ts(11168,11): error TS2300: Duplicate identifier 'Headers'.
[19:05:58] Error - typescript - __lib.d.ts(11177,13): error TS2300: Duplicate identifier 'Headers'.
[19:05:58] Error - typescript - __lib.d.ts(13566,11): error TS2300: Duplicate identifier 'Request'.
[19:05:58] Error - typescript - __lib.d.ts(13583,13): error TS2300: Duplicate identifier 'Request'.
[19:05:58] Error - typescript - __lib.d.ts(13588,11): error TS2300: Duplicate identifier 'Response'.
[19:05:58] Error - typescript - __lib.d.ts(13599,13): error TS2300: Duplicate identifier 'Response'.
[19:05:58] Error - typescript - __lib.d.ts(19116,18): error TS2300: Duplicate identifier 'fetch'.
[19:05:58] Error - typescript - __lib.d.ts(19121,6): error TS2300: Duplicate identifier 'BodyInit'.
[19:05:58] Error - typescript - __lib.d.ts(19152,6): error TS2300: Duplicate identifier 'RequestInfo'.
[19:05:58] Finished subtask 'tslint' after 3.53 s
[19:05:59] Error - 'typescript' sub task errored after 3.67 s
"TypeScript error(s) occurred."
[19:05:59] 'serve' errored after 5.41 s
[19:05:59]
[19:05:59] Finished subtask 'copyStaticAssets' after 5.41 s
[19:05:59] ==================[ Finished ]==================
I hope that helps. If not, please let me know what other information you may need.
Thanks again.
You should consider to delete the lines "@types/es6-promise": "0.0.32",
from the package.json file. It will be fix in the next version. Thanks for this bug report
Thank you for your help!
After deleting the line suggested from the package.json file, errors were still present while running gulp serve. However, after I git cloned the repo again it worked as expected with no errors. Thanks again.
Thanks for your feedback. The last package is now compatible with the SPFx v1.0 (GA), may be this version fixes this issue.
Hi Olivier,
I see that the web parts are now available as a precompiled package, but I was hoping to preview the web parts and run them on a local web server using "gulp serve" following your original installation instructions. Once I git clone the repo, run "npm install", and then attempt to run "gulp serve" a series of task errors arise that terminate the build. Is it no longer possible to run the web parts on a local web server using "gulp serve"?
Thanks for your help.