Fluentui: Cannot find module '@microsoft/load-themed-styles' from 'theme.js'

Created on 26 Jan 2018  路  8Comments  路  Source: microsoft/fluentui

Bug Report

  • __Package version(s)__: office-ui-fabric-react@=5.34.0
  • __Browser and OS versions__: irrelevant

Priorities and help requested (not applicable if asking question):

Are you willing to submit a PR to fix? Yes

Requested priority: High

Products/sites affected: Yammer.com

Describe the issue:

Builds have started failing today with the error:

ERROR in ./node_modules/@uifabric/styling/lib/styles/theme.js
Module not found: Error: Can't resolve '@microsoft/load-themed-styles' in '/Users/daniel/Code/yammer-clients-new/projects/yammer-web/node_modules/@uifabric/styling/lib/styles'
 @ ./node_modules/@uifabric/styling/lib/styles/theme.js 7:27-67
 @ ./node_modules/@uifabric/styling/lib/styles/index.js
 @ ./node_modules/@uifabric/styling/lib/index.js
 @ ./node_modules/office-ui-fabric-react/lib/Styling.js
 @ ./node_modules/yamui/dist/util/fabric/theme.js
 @ ./node_modules/yamui/dist/yamui.js
 @ ./node_modules/yamui/dist/components/Fabric/Fabric.js
 @ ./node_modules/yamui/dist/components/Fabric/index.js
 @ ./src/bootstrap/2-render/renderer.tsx
 @ ./src/bootstrap/2-render/index.ts
 @ ./src/bootstrap/0-entry/bootstrap.ts
 @ ./src/bootstrap/0-entry/main.ts
    Cannot find module '@microsoft/load-themed-styles' from 'theme.js'

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:191:17)
      at Object.<anonymous> (node_modules/@uifabric/styling/lib/styles/theme.js:7:28)

Actual behavior:

Error.

Expected behavior:

No error.

If applicable, please provide a codepen repro:

Not applicable.

Most helpful comment

Cheers jimmywim!
Installed previous version and it works!
npm install --no-save @microsoft/[email protected]

All 8 comments

Ha, weird. It looks like npm is installing an almost empty @microsoft/load-themed-styles module:

screen shot 2018-01-25 at 8 21 38 pm

Did you publish an empty module by accident?

Me too! I even uninstalled node.js and npm, reinstalled node 9.4 (npm 5.6) and create-react-app, then followed the instructions in the readme.md to the letter to create DocumentCardBasic with same error reported above.
(Windows 10 Pro 17025)

Any idea how to work around this? Our package.json in our project specifically references 5.38.1, however VSTS build seems to be getting whatever's the latest version regardless, which is this broken build.

Cheers jimmywim!
Installed previous version and it works!
npm install --no-save @microsoft/[email protected]

Looks like there was a hiccup in the release process yesterday. I went ahead and unpublished 1.7.26, so you should be getting 1.7.25 when you npm install @microsoft/load-themed-styles@latest. Let me know if you are experiencing the problem with any other packages.

closing this down as it appears resolved. feel free to open if problem persists.

I ran into this today. Had to manually run "npm install @microsoft/load-themed-styles@latest" against a fresh clone to get "npm install" to complete.

Was this page helpful?
0 / 5 - 0 ratings