Code Monkey home page Code Monkey logo

Comments (5)

OlivierCC avatar OlivierCC commented on June 18, 2024

Hi @joselarios. Yes you can still run your web part with gulp serve. Can you send me here your compilation issues ?
Thanks

from spfx-40-fantastics.

joselarios avatar joselarios commented on June 18, 2024

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.

from spfx-40-fantastics.

OlivierCC avatar OlivierCC commented on June 18, 2024

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

from spfx-40-fantastics.

joselarios avatar joselarios commented on June 18, 2024

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.

from spfx-40-fantastics.

OlivierCC avatar OlivierCC commented on June 18, 2024

Thanks for your feedback. The last package is now compatible with the SPFx v1.0 (GA), may be this version fixes this issue.

from spfx-40-fantastics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.