docusaurus-openapi-docs
docusaurus-openapi-docs copied to clipboard
Can't resolve '@react-stately/x' and 'react/jsx-runtime'
Describe the bug
The plugin works fine with docusaurus 2.3.0 with plugin 1.7.3. Creating this issue to document a current failure mode with the beta release.
Module not found: Error: Can't resolve '@react-stately/collections' in '/home/sfoo/marlowe-doc/.yarn/__virtual__/@nextui-org-react-virtual-d40de1b577/0/cache/@nextui-org-react-npm-1.0.0-beta.9-dbg2-7352ab2338-557fcd4d23.zip/node_modules/@nextui-org/react/esm/dropdown/base'
Module not found: Error: Can't resolve '@react-stately/collections' in '/home/sfoo/marlowe-doc/.yarn/__virtual__/@nextui-org-react-virtual-d40de1b577/0/cache/@nextui-org-react-npm-1.0.0-beta.9-dbg2-7352ab2338-557fcd4d23.zip/node_modules/@nextui-org/react/esm/dropdown'
Module not found: Error: Can't resolve '@react-stately/menu' in '/home/sfoo/marlowe-doc/.yarn/__virtual__/@nextui-org-react-virtual-d40de1b577/0/cache/@nextui-org-react-npm-1.0.0-beta.9-dbg2-7352ab2338-557fcd4d23.zip/node_modules/@nextui-org/react/esm/dropdown'
Module not found: Error: Can't resolve 'react/jsx-runtime' in '/home/sfoo/marlowe-doc/.yarn/__virtual__/react-live-virtual-da37983e26/0/cache/react-live-npm-4.1.3-3049f035ae-60faeda713.zip/node_modules/react-live/dist'
Did you mean 'jsx-runtime.js'?
BREAKING CHANGE: The request 'react/jsx-runtime' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
[ERROR] Client bundle compiled with errors therefore further build is impossible.
Steps to reproduce
- Upgrade to docusaurus v2.4.1
- Upgrade
docusaurus-plugin-openapi-docs
anddocusaurus-theme-openapi-docs
to 2.0.0-beta.3 -
yarn
to install packages -
yarn build
yields the error above
Context
Although the plugin works on an older version, I prefer not to incur tech debt and forced to downgrade because of a plugin.
Your Environment
Using nvm for node.
- Version used:
- Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3): node v19.3.0
- Operating System and version (desktop or mobile): linux
- Link to your project: -
:tada: Thanks for opening your first issue here! Welcome to the community!
Seeing the same thing.
You can try following some of the workarounds mentioned here https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues/578 I had to upgrade my Docusaurus project to React 18 in order to solve this issue.
Still haven't quite found the right combination of dependencies, if possible at all.
Module not found: Error: Can't resolve '@react-stately/collections' in '/home/sfoo/marlowe-doc/.yarn/__virtual__/@nextui-org-react-virtual-d40de1b577/0/cache/@nextui-org-react-npm-1.0.0-beta.9-dbg2-7352ab2338-557fcd4d23.zip/node_modules/@nextui-org/react/esm/dropdown/base'
Module not found: Error: Can't resolve '@react-stately/collections' in '/home/sfoo/marlowe-doc/.yarn/__virtual__/@nextui-org-react-virtual-d40de1b577/0/cache/@nextui-org-react-npm-1.0.0-beta.9-dbg2-7352ab2338-557fcd4d23.zip/node_modules/@nextui-org/react/esm/dropdown'
Module not found: Error: Can't resolve '@react-stately/menu' in '/home/sfoo/marlowe-doc/.yarn/__virtual__/@nextui-org-react-virtual-d40de1b577/0/cache/@nextui-org-react-npm-1.0.0-beta.9-dbg2-7352ab2338-557fcd4d23.zip/node_modules/@nextui-org/react/esm/dropdown'
I second what @sfoo-iohk said, I'm also blocked at this step and I can't really find the difference with the demo project from this repo.
Reproduced it in beta.4
.
TypeError: Cannot convert a Symbol value to a string
at $eb2240fc39a57fa5$export$bf788dd355e3a401.getFullNode (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/collections/dist/import.mjs:205:53)
at getFullNode.next (
at file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/collections/dist/import.mjs:316:16
at Object.useMemo (C:\Users\Muhammad Ali Khan\Desktop\React - Next Projects\Rawind Soft-Tech\rawind-soft-tech\node_modules\react-dom\cjs\react-dom-server.browser.development.js:5124:19)
at useMemo (C:\Users\Muhammad Ali Khan\Desktop\React - Next Projects\Rawind Soft-Tech\rawind-soft-tech\node_modules\react\cjs\react.development.js:1650:21)
at $7613b1592d41b092$export$6cd28814d92fa9c9 (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/collections/dist/import.mjs:310:37)
at $e72dd72e1c76a225$export$2f645645f7bca764 (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/list/dist/import.mjs:119:47)
at $a0d645289fe9b86b$export$e7f05e985daf4b5f (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/list/dist/import.mjs:194:148)
at $76f919a04c5a7d14$export$4ba071daf4e486 (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/tabs/dist/import.mjs:28:53)
TypeError: Cannot convert a Symbol value to a string
at $eb2240fc39a57fa5$export$bf788dd355e3a401.getFullNode (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/collections/dist/import.mjs:205:53)
at getFullNode.next (
at file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/collections/dist/import.mjs:316:16
at Object.useMemo (C:\Users\Muhammad Ali Khan\Desktop\React - Next Projects\Rawind Soft-Tech\rawind-soft-tech\node_modules\react-dom\cjs\react-dom-server.browser.development.js:5124:19)
at useMemo (C:\Users\Muhammad Ali Khan\Desktop\React - Next Projects\Rawind Soft-Tech\rawind-soft-tech\node_modules\react\cjs\react.development.js:1650:21)
at $7613b1592d41b092$export$6cd28814d92fa9c9 (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/collections/dist/import.mjs:310:37)
at $e72dd72e1c76a225$export$2f645645f7bca764 (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/list/dist/import.mjs:119:47)
at $a0d645289fe9b86b$export$e7f05e985daf4b5f (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/list/dist/import.mjs:194:148)
at $76f919a04c5a7d14$export$4ba071daf4e486 (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/tabs/dist/import.mjs:28:53)
⨯ TypeError: Cannot convert a Symbol value to a string
at $eb2240fc39a57fa5$export$bf788dd355e3a401.getFullNode (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/collections/dist/import.mjs:205:53)
at getFullNode.next (
at file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/collections/dist/import.mjs:316:16
at Object.useMemo (C:\Users\Muhammad Ali Khan\Desktop\React - Next Projects\Rawind Soft-Tech\rawind-soft-tech\node_modules\react-dom\cjs\react-dom-server.browser.development.js:5124:19)
at useMemo (C:\Users\Muhammad Ali Khan\Desktop\React - Next Projects\Rawind Soft-Tech\rawind-soft-tech\node_modules\react\cjs\react.development.js:1650:21)
at $7613b1592d41b092$export$6cd28814d92fa9c9 (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/collections/dist/import.mjs:310:37)
at $e72dd72e1c76a225$export$2f645645f7bca764 (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/list/dist/import.mjs:119:47)
at $a0d645289fe9b86b$export$e7f05e985daf4b5f (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/list/dist/import.mjs:194:148)
at $76f919a04c5a7d14$export$4ba071daf4e486 (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/tabs/dist/import.mjs:28:53) {
page: '/'
}
⨯ TypeError: Cannot convert a Symbol value to a string
at $eb2240fc39a57fa5$export$bf788dd355e3a401.getFullNode (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/collections/dist/import.mjs:205:53)
at getFullNode.next (
at file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/collections/dist/import.mjs:316:16
at Object.useMemo (C:\Users\Muhammad Ali Khan\Desktop\React - Next Projects\Rawind Soft-Tech\rawind-soft-tech\node_modules\react-dom\cjs\react-dom-server.browser.development.js:5124:19)
at useMemo (C:\Users\Muhammad Ali Khan\Desktop\React - Next Projects\Rawind Soft-Tech\rawind-soft-tech\node_modules\react\cjs\react.development.js:1650:21)
at $7613b1592d41b092$export$6cd28814d92fa9c9 (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/collections/dist/import.mjs:310:37)
at $e72dd72e1c76a225$export$2f645645f7bca764 (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/list/dist/import.mjs:119:47)
at $a0d645289fe9b86b$export$e7f05e985daf4b5f (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/list/dist/import.mjs:194:148)
at $76f919a04c5a7d14$export$4ba071daf4e486 (file:///C:/Users/Muhammad%20Ali%20Khan/Desktop/React%20-%20Next%20Projects/Rawind%20Soft-Tech/rawind-soft-tech/node_modules/@react-stately/tabs/dist/import.mjs:28:53) {
page: '/'
}
I am still facing this with:
node: v20.11.0
@docusaurus/core: 2.4.3
docusaurus-theme-openapi-docs: 2.1.3
@blindaa121 any updates?