Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation site is down again #508

Closed
aparajita opened this issue Mar 8, 2025 · 2 comments
Closed

Documentation site is down again #508

aparajita opened this issue Mar 8, 2025 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@aparajita
Copy link

📚 Is your documentation request related to a problem?

When I go to regex.dev I get this:

500

Error
Cannot read properties of null (reading 'map')

🔍 Where should you find it?

Home page

ℹ️ Additional context

Brave browser, no blocking active

@aparajita aparajita added the documentation Improvements or additions to documentation label Mar 8, 2025
@nozomuikuta
Copy link
Member

nozomuikuta commented Mar 10, 2025

@danielroe

Here is the result of my debug:

Running pnpm run build in docs directory results in the following error (only prerendering of index page fails):

The requested module 'file:///Users/nozomuikuta/Repositories/unjs/magic-regexp/node_modules/.pnpm/[email protected]/node_modules/ohash/dist/index.mjs' does not provide an export named 'diff'

    import { isEqual, diff, hash as hash$2 } from '/Users/nozomuikuta/Repositories/unjs/magic-regexp/node_modules/.pnpm/[email protected]/node_modules/ohash/dist/index.mjs';

This is because undocs depends on 2 versions of c12, 2.0.1 and 3.0.2, and the former imports diff utility from ohash (v1.1.4), which has come to be exported from ohash/utils as of ohash v2.0.1 (the latter depends on v2.0.11).

I'm not sure how Nuxt/Nitro merges packages and their exports and generate code, but I guess it just makes up key-value map based on imports and package name (i.e. import { a, b, c } from 'package-name') through static analysis, doesn't it?

If so, overriding package versions in package.json can't be a solution for this issue as long as ohash exports diff utility, and you would need to downgrade undocs and/or related packages so that only one version ohash package is used, or to patch ohash v1.1.4 for it to export diff from ohash/utils.

@js-mpa js-mpa marked this as a duplicate of #514 Mar 12, 2025
@danielroe
Copy link
Member

this should now be resolved with the new docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants