-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task 'serve' is not in your gulpfile #2065
Comments
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible. |
Hi @DKOliver, Tested it and I had no issues running the webpart. Have you tried to delete |
Here's my gulp file 'use strict'; const gulp = require('gulp'); build.addSuppression( /********************************************************************************************
build.initialize(gulp); So i tried doing what you said and removed node modules and did it again. If i run gulp serve-deprecated it runs. Webpage runs but it's just a blank screen, but then i get this Build target: DEBUG |
Out of curiosity, can you run the command |
Version 4.4.3 |
I think, it's a conflict of different typescript versions on your machine. Have you tried the solution of the blog post? |
Oh okay. Sry i'm entirely new to this. Never used Visual Studio before really. I'm just a sysadmin that's been tasked with building a new sharepoint intranet lol Anyway i opened the folder and changed the typescript version still no luck though. Getting the black screen PS C:\Users\ot2\Desktop\sp-dev-fx-webparts\samples\react-rss-reader> gulp serve-deprecated |
By the way, when you changed your Typescript version. Delete your node_modules and do And normally, you need to use |
Yes
Okay i deleted node_modules and tried again. I cannot use gulp-serve as it's not a function in the gulpfile as i posted above Adding @ts-ignore definitely did something. not sure tho if this is all i'm supposed to see? Tho i am getting a lot of errors. It's a bit long so here's a pastebin https://pastebin.com/tDWEyQKL |
@DKOliver Can try out this command Can you also check |
Closing this issue due to lack of response from original poster. |
Wrong or missing author @mentionsThank you for your submission, but you appear to have forgotten to @mention the sample author(s). To help increase your chances of getting assistance from the original authors of the sample, you should make sure to @mention the actual authors (and not the repository maintainers). Please note that the sample authors will not get notified about this issue unless you update this issue accordingly. You can find the author(s) of each sample in the sample's We'll automatically close this issue in 7 days unless you update the issue. For more information on how to create a good issue, refer to our wiki for more information: How to Create Good Issues |
Sample
https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-rss-reader
Author(s)
@hugoabernier
What happened?
I'm trying to preview this sample but i'm running into this error after running npm install in the folder
I am running node 10.16.3 and Gulp V3
PS C:\Users\ot2\Desktop\sp-dev-fx-webparts\samples\react-rss-reader> gulp serve
Build target: DEBUG
[20:59:15] Using gulpfile ~\Desktop\sp-dev-fx-webparts\samples\react-rss-reader\gulpfile.js
[20:59:15] Task 'serve' is not in your gulpfile
[20:59:15] Please check the documentation for proper gulpfile formatting
[20:59:15] Task 'serve' is not in your gulpfile
[20:59:15] Please check the documentation for proper gulpfile formatting
About to exit with code: 1
Process terminated before summary could be written, possible error in async code not continuing!
Trying to exit with exit code 1
If i run just gulp or gulp build i get this
PS C:\Users\ot2\Desktop\sp-dev-fx-webparts\samples\react-rss-reader> gulp
Build target: DEBUG
[21:04:07] Using gulpfile ~\Desktop\sp-dev-fx-webparts\samples\react-rss-reader\gulpfile.js
[21:04:07] Starting gulp
[21:04:07] Starting 'default'...
[21:04:07] Starting subtask 'configure-sp-build-rig'...
[21:04:07] Finished subtask 'configure-sp-build-rig' after 2.56 ms
[21:04:07] Starting subtask 'pre-copy'...
[21:04:07] Finished subtask 'pre-copy' after 13 ms
[21:04:07] Starting subtask 'copy-static-assets'...
[21:04:07] Starting subtask 'sass'...
[21:04:07] Finished subtask 'copy-static-assets' after 97 ms
[21:04:07] Finished subtask 'sass' after 166 ms
[21:04:07] Starting subtask 'tslint'...
[21:04:08] [tslint] tslint version: 5.12.1
[21:04:08] Starting subtask 'tsc'...
[21:04:08] [tsc] typescript version: 3.3.4000
[21:04:10] Error - [tsc] src/webparts/rssReader/RssReaderWebPart.ts(171,17): error TS2416: Property 'dataVersion' in type 'RssReaderWebPart' is not assignable to the same property in base type 'BaseClientSideWebPart'.
[21:04:10] [tsc] Type 'import("C:/Users/ot2/Desktop/sp-dev-fx-webparts/samples/react-rss-reader/node_modules/@microsoft/sp-core-library/dist/index-internal").Version' is not assignable to type 'import("C:/Users/ot2/Desktop/sp-dev-fx-webparts/samples/react-rss-reader/node_modules/@microsoft/sp-http/node_modules/@microsoft/sp-core-library/dist/index-internal").Version'.
[21:04:10] [tsc] Types have separate declarations of a private property '_major'.
[21:04:10] Error - 'tsc' sub task errored after 2.63 s
exited with code 2
[21:04:10] 'default' errored after 3.34 s
[21:04:10]
[21:04:11] Finished subtask 'tslint' after 3.45 s
[21:04:11] ==================[ Finished ]==================
Error - [tsc] src/webparts/rssReader/RssReaderWebPart.ts(171,17): error TS2416: Property 'dataVersion' in type 'RssReaderWebPart' is not assignable to the same property in base type 'BaseClientSideWebPart'.
Error - 'tsc' sub task errored after 2.63 s
exited with code 2
[21:04:11] Project react-rssreader version:1.0.0
[21:04:11] Build tools version:3.17.11
[21:04:11] Node version:v10.16.3
[21:04:11] Total duration:6.24 s
[21:04:11] Task errors:2
Steps to reproduce
Expected behavior
I presume a webpage with the plugin would open. :D
Target SharePoint environment
SharePoint Online
Developer environment
Windows
Browsers
Node.js version
v10.16.3
Additional environment details
I have followed this guide but used older version of Node JS and Gulp https://docs.microsoft.com/da-dk/sharepoint/dev/spfx/set-up-your-development-environment
The text was updated successfully, but these errors were encountered: