OlivierCC / spfx-40-fantastics

This package is a sample kit of Client Side Web Parts built on the SharePoint Framework SPFx. You can find here different kind of high visual web parts as carousel, images galleries, animations, map, editors, etc.
MIT License
407 stars 279 forks source link

project fails during gulp serve #43

Open john88benson opened 6 years ago

john88benson commented 6 years ago

Hi,

I've been attempting to install and run these web parts but I have consistently encountered errors during the gulp serve. I have tried it on two separate machines and have used nvm to run the npm install with both 8.4.0 and 6.11.3 to see if it made a difference.

I have attached the output from the gulp serve:

gulpRun.txt

Cheers,

-JB

MarianoPrz commented 6 years ago

Hi! i've same issue, yo need to install all dependencies, like the sp-custom-list, etc, check the versions of the package.json, i'm install the same versions describe it there, and works.

ShauneDonohue commented 6 years ago

I have the same issue and have tried manually installing all the versions specified in the package.json file to no avail.

Christian-Stahl commented 6 years ago

Same issue here as john88benson, I got the latest version according to package.json. Any tips about exactly what that should manually be installad, and where?

kulkarnichief commented 6 years ago

I have the same issue and have installed all the versions specified in the package.json file but errors still persist

kmarwen commented 6 years ago

Does any one know how to make these webparts work plz? thx

kmosti commented 6 years ago

I had version 1.3.0 installed of packages microsoft/sp-http and microsoft/sp-loader which seemed to cause these errors

kmarwen commented 6 years ago

I just removed the ^ and ~ from :

    "@microsoft/sp-core-library": "~1.1.0",
    "@microsoft/sp-http": "^1.1.1",
    "@microsoft/sp-loader": "^1.1.1",

now i have :

    "@microsoft/sp-core-library": "1.1.0",
    "@microsoft/sp-http": "1.1.1",
    "@microsoft/sp-loader": "1.1.1",

deleted the 2 folders : @microsoft and @types from node_modules

added context in MessageBarWebPart.ts

PropertyFieldRichTextBox('text', {
                  context:this.context,

gulp clean gulp serve

and that's all, and works fine

thank you @kmosti

NL12143 commented 6 years ago

Kudos to @kmarmen @kmosti. For this it is on GitHub. Solve and improve. Anybody can commit the chages?

Panoone commented 6 years ago

The above fixes didn't work for me and I wound up having to delete my entire node_modules directory and then run npm i again.

I am STILL receiving Typescript errors during gulp serve which all look like the following:

Error - typescript - src\webparts\gridGallery\SPPicturesListService.ts(61,126): error TS2345: Argument of type 'SPHttpClientConfiguration' is not assignable to parameter of type 'SPHttpClientConfiguration'.

@OlivierCC , @kmarwen or @kmosti : are you able to help me overcome this last hurdle please?

kmarwen commented 6 years ago

@Panoone you have to force the versions of the project modules in the package.json file

I also have issues with the new node version (8) but not the same as yours

Panoone commented 6 years ago

@kmarwen do you mean I should remove the leading ^ and ~ from all the dependencies, or just the Microsoft ones?

I was hoping to update the spfx modules and dependencies but it seems that a total re-write of the webparts would be required.

Panoone commented 6 years ago

Success!!! 😃

[10:05:09] Project spfx-40-fantastics version: 1.0.4
[10:05:09] Build tools version: 2.5.3
[10:05:09] Node version: v8.9.3
[10:05:09] Total duration: 1.48 min
[10:05:09] Task warnings: 12
kmarwen commented 6 years ago

gg @Panoone 💃