question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting started causes Error: Package subpath './lib/sidebars/generator'

See original GitHub issue

Started by trying to bootstrap a normal project:

npx create-docusaurus-openapi pizza
cd pizza
npm start

After which i get this error:

[ERROR] Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/sidebars/generator' is not defined by "exports" in /Users/rasmus/Desktop/DEV/Work/pizza/node_modules/@docusaurus/plugin-content-docs/package.json
    at new NodeError (internal/errors.js:322:7)
    at throwExportsNotFound (internal/modules/esm/resolve.js:322:9)
    at packageExportsResolve (internal/modules/esm/resolve.js:545:3)
    at resolveExports (internal/modules/cjs/loader.js:450:36)
    at Function.Module._findPath (internal/modules/cjs/loader.js:490:31)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:888:27)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:93:18)
    at Object.<anonymous> (/Users/rasmus/Desktop/DEV/Work/pizza/node_modules/docusaurus-plugin-openapi/lib/sidebars/index.js:14:21)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:93:18)

node --version: v14.18.1 npm --version: 6.14.15

By the way, absolutely love this project! Would like to create a pull request to fix this but at the moment I have absolutely no clue how to get around this.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:29 (18 by maintainers)

github_iconTop GitHub Comments

2reactions
bourdakos1commented, Feb 3, 2022

It seems like Docusaurus 2.0.0-beta.15 has broken some things. Even though we pin the version to 2.0.0-beta.14 it ends up also installing newer versions due to some of our internal dependencies. As a temporary workaround, you can add this to your package.json:

"resolutions": {
    "@docusaurus/core": "2.0.0-beta.14",
    "@docusaurus/preset-classic": "2.0.0-beta.14",
    "@docusaurus/mdx-loader": "2.0.0-beta.14",
    "@docusaurus/plugin-content-docs": "2.0.0-beta.14",
    "@docusaurus/types": "2.0.0-beta.14",
    "@docusaurus/utils-validation": "2.0.0-beta.14",
    "@docusaurus/utils": "2.0.0-beta.14"
},
1reaction
Misotechcommented, Feb 12, 2022

@bourdakos1 Thanks! This is work

Read more comments on GitHub >

github_iconTop Results From Across the Web

131 - Stack Overflow
I was receiving Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/parser' is not defined by "exports ...
Read more >
Issues - GitHub
after yarn create-react-app and yarn start, the below error message was displayed. ... [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath '.
Read more >
package subpath not defined by exports - You.com - You.com
I get the following error: Package subpath './compiler.js' is not defined by "exports" in {path to temp/node_modules/svelte/package.json} ...
Read more >
When I run yarn start , I get this error - Reddit
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in /root/.../package.json.
Read more >
Issue #23260: Update Windows installer - Python mailing list
To make Python available, the CPython team has compiled Windows installers (MSI packages) with every `release ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found