docusaurus-openapi-docs icon indicating copy to clipboard operation
docusaurus-openapi-docs copied to clipboard

Can't resolve '@react-stately/x' and 'react/jsx-runtime'

Open sfoo-iohk opened this issue 11 months ago • 8 comments

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

  1. Upgrade to docusaurus v2.4.1
  2. Upgrade docusaurus-plugin-openapi-docs and docusaurus-theme-openapi-docs to 2.0.0-beta.3
  3. yarn to install packages
  4. 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: -

sfoo-iohk avatar Aug 04 '23 21:08 sfoo-iohk

:tada: Thanks for opening your first issue here! Welcome to the community!

Seeing the same thing.

Kienan6 avatar Aug 07 '23 22:08 Kienan6

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.

aamir1995 avatar Aug 15 '23 13:08 aamir1995

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'

sfoo-iohk avatar Aug 29 '23 04:08 sfoo-iohk

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.

Mikescops avatar Oct 09 '23 16:10 Mikescops

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 $eb2240fc39a57fa5$export$bf788dd355e3a401.iterateCollection (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:145:54) at iterateCollection.next () at [Symbol.iterator] (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:289:22) at Generator.next () at new $a02d57049d202695$export$d085fb9e920b5ca7 (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:81:18) at 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:111:129
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 $eb2240fc39a57fa5$export$bf788dd355e3a401.iterateCollection (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:145:54) at iterateCollection.next () at [Symbol.iterator] (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:289:22) at Generator.next () at new $a02d57049d202695$export$d085fb9e920b5ca7 (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:81:18) at 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:111:129
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 $eb2240fc39a57fa5$export$bf788dd355e3a401.iterateCollection (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:145:54) at iterateCollection.next () at [Symbol.iterator] (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:289:22) at Generator.next () at new $a02d57049d202695$export$d085fb9e920b5ca7 (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:81:18) at 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:111:129
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 $eb2240fc39a57fa5$export$bf788dd355e3a401.iterateCollection (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:145:54) at iterateCollection.next () at [Symbol.iterator] (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:289:22) at Generator.next () at new $a02d57049d202695$export$d085fb9e920b5ca7 (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:81:18) at 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:111:129
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: '/' } image

muhammadalizkhan avatar Oct 15 '23 05:10 muhammadalizkhan

I am still facing this with:

 node: v20.11.0
 @docusaurus/core: 2.4.3
 docusaurus-theme-openapi-docs: 2.1.3

JanCizmar avatar Apr 02 '24 09:04 JanCizmar