You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uncaught SyntaxError: The requested module '/@npm/scheduler' does not provide an export named 'unstable_NormalPriority' (at react-context-selector:3:36)
from import { unstable_NormalPriority as NormalPriority, unstable_runWithPriority as runWithPriority } from 'scheduler';
in \node_modules\@fluentui\react-context-selector\lib\createContext.js
unstable_NormalPriority from \node_modules\scheduler\cjs\scheduler.{Env}.js
defined in \node_modules\@types\scheduler\index.d.ts
To Reproduce yarn create wmr & yarn add @fluentui/react-components
Just want to add to this issue that adding @rollup/plugin-commonjs does make the error disappear for me, so it sounds like once we narrow that weird Rollup version bug down you should have a working solution to this.
For any other readers, you can do the following:
$ yarn add @rollup/plugin-commonjs
wmr.config.mjs
import { defineConfig } from 'wmr';
+import commonjs from '@rollup/plugin-commonjs';
// Full list of options: https://wmr.dev/docs/configuration
export default defineConfig({
/* Your configuration here */
alias: {
react: 'preact/compat',
'react-dom': 'preact/compat'
},
+ plugins: [commonjs()]
});
@Aloento there's no need to create a new issue for each broken package - they're all the same issue: WMR doesn't support conditional re-exports in CommonJS modules. This affects all packages published by the React team, and a number of packages from the React community that have copied their packaging design.
Describe the bug
from
import { unstable_NormalPriority as NormalPriority, unstable_runWithPriority as runWithPriority } from 'scheduler';
in
\node_modules\@fluentui\react-context-selector\lib\createContext.js
unstable_NormalPriority
from\node_modules\scheduler\cjs\scheduler.{Env}.js
defined in
\node_modules\@types\scheduler\index.d.ts
To Reproduce
yarn create wmr & yarn add @fluentui/react-components
index.js
The text was updated successfully, but these errors were encountered: