5

Original title: sp-build-web upgrade conflict with components. See update.

I have a docker container (with the waldekm/spfx image), and i updated @microsoft/sp-build-web to 1.0.1 as some article suggest for using officeui react components.

Now I can't gulp serve my project because typescript founds an error between IClientSideComponentContext and IWebPartContext. I found out @microsoft/sp-container-base got updated to (to 1.0.1), and that version references to @microsoft/sp-module-interfaces @ 1.1.0. But my project still has sp-module-interfaces @1.0.0 so it has an error on that interface.

IClientSideComponentManifest.d.ts 1.1.0:

componentType: 'Application' | 'WebPart' | 'Library' | 'Extension';

IClientSideComponentManifest.d.ts 1.0.0

componentType: 'Application' | 'WebPart' | 'Library' | 'CodePart';

And this are some extracts from package.json in sp-component-base 1.0.1

"_from": "@microsoft/sp-component-base@>=1.0.0 <1.1.0",
  "_id": "@microsoft/sp-component-base@1.0.1",
  "_inCache": true,
  "_location": "/@microsoft/sp-component-base",
  "_nodeVersion": "6.10.3",
  "_npmOperationalInternal": {
    "host": "s3://npm-registry-packages",
    "tmp": "tmp/sp-component-base-1.0.1.tgz_1496783169467_0.2372209916356951"
  },

"_requested": {
    "raw": "@microsoft/sp-component-base@~1.0.0",
    "scope": "@microsoft",
    "escapedName": "@microsoft%2fsp-component-base",
    "name": "@microsoft/sp-component-base",
    "rawSpec": "~1.0.0",
    "spec": ">=1.0.0 <1.1.0",
    "type": "range"
  },

 "dependencies": {
    "@microsoft/decorators": "~1.0.1",
    "@microsoft/sp-core-library": "~1.1.0",
    "@microsoft/sp-loader": "~1.1.0",
    "@microsoft/sp-lodash-subset": "~1.1.0",
    "@microsoft/sp-module-interfaces": "~1.1.0",
    "@types/es6-collections": "0.5.29",
    "@types/es6-promise": "0.0.32",
    "@types/webpack-env": "1.13.0"
  },

Not sure who is wrong here. My bets are on the package.json in sp-component-base 1.0.1. Any ideas?

UPDATE: It's not only for an upgrade. Vanilla projects generated right now with GA won't compile. I'd advise to not change your packages of your working 1.0.0 projects until further notice.

  • Welcome to SharePoint StackExchange :) , Could you please take a quick tour at sharepoint.stackexchange.com/tour to get informed badge! Thank you for your contribution :) – Mohamed El-Qassas MVP Jun 7 '17 at 22:38
  • 1
    Workaround: Upgrade everything to 1.1.0. I tried different things, didn't work again in an older version. – Pedro Pablo Jun 8 '17 at 2:31
  • 3
    We are aware of the issue and will push out an update for this later today. – Vesa Juvonen Jun 8 '17 at 13:51
4

I'm trying to diagnose what is happening here.

As a possible workaround, can you run npm outdated

and in your package.json file update the @microsoft/# references? They should all be 1.1.0, and probably include sp-build-web, sp-core-library, sp-module-interfaces, sp-webpart-base and sp-webpart-workbench.

OK - sorted out the problem with running the original yeoman generator with the latest bits. The problem is that there was a package published with a patch version change (1.0.0 -> 1.0.1) that should have been 1.1.0. The 1.0.1 package references 1.1.0 packages (which are part of the latest release). So we wind up with a mismatched collection of packages. We're working on getting this sorted out and we will republish our packages. People using the 1.0.x yeoman generator won't need to do anything other recreate the solution (or reinstall the npm packages) if they hit this issue.

Last Update - fix has been released. Offending packages have been removed, updated packages published.

  • Your comment is the fix when the packages are updated, right?. Because reinstalling npm packages now will cause the issue. – Pedro Pablo Jun 8 '17 at 21:07
  • 1
    We are working on a new set of 1.1.* packages that encompass all the new bits, and the 1.0.* yeoman generator will only pull in 1.0.* packages. Should be out in a few hours. The problem is that the 1.0 generator winds up getting 1.1 packages (through a mistake in our versioning). 1.0 code works fine with 1.1 packages, but 1.0 packages don't mix and match with 1.1 packages. – PatMill_MSFT Jun 8 '17 at 21:38
0

Ran into this issue yesterday, but the issue seems resolved after reinstalling my packages today. I'm using the 1.0.0 packages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.