spfx-40-fantastics icon indicating copy to clipboard operation
spfx-40-fantastics copied to clipboard

project fails during gulp serve

Open john88benson opened this issue 7 years ago • 13 comments

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

john88benson avatar Sep 06 '17 12:09 john88benson

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.

MarianoPrz avatar Sep 07 '17 15:09 MarianoPrz

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

ShauneDonohue avatar Sep 13 '17 16:09 ShauneDonohue

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?

Christian-Stahl avatar Sep 16 '17 22:09 Christian-Stahl

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

kulkarnichief avatar Sep 19 '17 07:09 kulkarnichief

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

kmarwen avatar Oct 30 '17 09:10 kmarwen

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

  • I uninstalled these (npm unistall packagename)
  • changed the package.json file from ˆ1.1.1 to 1.1.1 for both of these packages
  • Deleted the node_modules/@microsoft directory which seemed to have multiple versions of the same library
  • Then I also had to add a context property to the message web part on line 112
  • npm i to install these libraries again and then gulp serve passed with no errors

kmosti avatar Oct 30 '17 13:10 kmosti

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

kmarwen avatar Oct 30 '17 16:10 kmarwen

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

NL12143 avatar Nov 21 '17 09:11 NL12143

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?

Panoone avatar Dec 21 '17 02:12 Panoone

@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

kmarwen avatar Dec 21 '17 14:12 kmarwen

@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 avatar Dec 21 '17 21:12 Panoone

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

Panoone avatar Dec 21 '17 23:12 Panoone

gg @Panoone 💃

kmarwen avatar Dec 22 '17 10:12 kmarwen