fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

[Bug]: react-hooks 8.6.8 package empty and breaks all of @fluentui/react

Open ilbrando opened this issue 4 years ago • 13 comments

Library

React / v8 (@fluentui/react)

System Info

N/A

Are you reporting Accessibility issue?

No response

Reproduction

https://www.npmjs.com/package/@fluentui/react-hooks

Bug Description

It appears that the package @fluentui/react-hooks version 6.8.6 is broken. I get an error when importing from it. When I inspect the package in the node_modules folder it doesn't contain a lib folder. I have also downloaded the TGZ file at https://registry.npmjs.org/@fluentui/react-hooks/-/react-hooks-8.6.8.tgz and unpacked it. It contains these files and folders:

-rw-r--r-- 1 MIB 1049089 57472 okt 26  1985 CHANGELOG.json
-rw-r--r-- 1 MIB 1049089 32428 okt 26  1985 CHANGELOG.md
drwxr-xr-x 1 MIB 1049089     0 aug 24 13:27 config/
drwxr-xr-x 1 MIB 1049089     0 aug 24 13:27 etc/
-rw-r--r-- 1 MIB 1049089    55 okt 26  1985 just.config.ts
-rw-r--r-- 1 MIB 1049089  1259 okt 26  1985 LICENSE
-rw-r--r-- 1 MIB 1049089  1228 okt 26  1985 package.json
-rw-r--r-- 1 MIB 1049089 15603 okt 26  1985 README.md

The package.json file contains these entries:

  "main": "lib-commonjs/index.js",
  "module": "lib/index.js",
  "typings": "lib/index.d.ts",

The package is a dependency of @fluentui/react which doesn't work if you install the newest version (8.91.0).

Logs

No response

Requested priority

Normal

Products/sites affected

No response

Are you willing to submit a PR to fix?

no

Validations

  • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • [X] The provided reproduction is a minimal reproducible example of the bug.

ilbrando avatar Aug 24 '22 11:08 ilbrando

It is the same with @fluentui/theme version 2.6.13.

ilbrando avatar Aug 24 '22 11:08 ilbrando

And with @fluentui/[email protected]

rameier avatar Aug 24 '22 11:08 rameier

In my case, fluentui doesn't have .d.ts files for some modules so imports are not being resolved.

RinkuMonani avatar Aug 24 '22 11:08 RinkuMonani

Since 8:00 looking for a reason whats the Problem in my project comes from and just stripped it down to the simplest example of empty @fluentui/theme too

I tried to fix "@fluentui/react" to a lower version, but the dependencies always loads the newest minor version

I´m not sure if this has something to do with this problem: while checking the history of all the related packages I was wondering about https://github.com/microsoft/fluentui/pull/24332 which should not affect v8 versions?

trueleader avatar Aug 24 '22 12:08 trueleader

I have the same problem. In my case I did a fresh git clone and yarn install of my project and it breaks the react build for no apparent reason!

I get:

Module not found: Error: Can't resolve '@fluentui/react-focus' in '/Users/........./node_modules/@fluentui/react/lib'

The @fluentui/react-focus package with the correct version exists!

Any ideas?

blendsdk avatar Aug 24 '22 13:08 blendsdk

@blendsdk until the problem has been fixed, you have to use explicit versions of fluentui dependencies: https://github.com/microsoft/fluentui/issues/24467#issuecomment-1225582157 In my project I have to use the dependency block instead of overrides

trueleader avatar Aug 24 '22 13:08 trueleader

Same issue, using explicit versions of fluentui dependencies does solve the problem in the short term until a fix lands.

ChrisMcKee1 avatar Aug 24 '22 14:08 ChrisMcKee1

I just want to confirm that we're running into the same issue. Lib folders are missing in many of the latest @fluentui packages, causing errors.

For now the only fix is to install explicit versions of all the dependencies (typically one patch version lower than the latest is ok)

MarksPoint avatar Aug 24 '22 14:08 MarksPoint

Module not found: Error: Can't resolve '@fluentui/theme' Module not found: Error: Can't resolve '@fluentui/style-utilities' Module not found: Error: Can't resolve '@fluentui/react-hooks'

I am seeing the same

Trish92 avatar Aug 24 '22 14:08 Trish92

This was caused by a bad publish yesterday. #24500 is the first step to fixing the issue and then we'll publish a new build.

TristanWatanabe avatar Aug 24 '22 14:08 TristanWatanabe

A new version (8.91.1) of @fluentui/react has just been published which should have resolved the issues

TristanWatanabe avatar Aug 24 '22 16:08 TristanWatanabe

Can confirm this is working for us!

pavsaund avatar Aug 24 '22 21:08 pavsaund

Yes works fine. Thank you.

Trish92 avatar Aug 24 '22 21:08 Trish92