retext-keywords icon indicating copy to clipboard operation
retext-keywords copied to clipboard

Error: Attempted import error: 'color' is not exported from 'unist-util-visit-parents/do-not-use-color' (imported as 'color').

Open daveleee opened this issue 6 months ago • 2 comments

Initial checklist

Affected packages and versions

 "retext": "^9.0.0",     "retext-keywords": "^8.0.1",     "retext-pos": "^5.0.0",    "nlcst-to-string": "^4.0.0",    "to-vfile": "^8.0.0",

Link to runnable example

No response

Steps to reproduce

  1. Start a new Next.js (V13) project in a clean directory
  2. pnpm install retext
  3. pnpm install retext-keywords
  4. pnpm install nlcst-to-string
  5. pnpm install retext-pos
  6. pnpm install to-vfile
  7. create a file called index.tsx
  8. copy the contents of the example given in the readme
  9. create the example.txt file in the same directory
  10. run app

Expected behavior

We should be able to see keywords and phrases, but instead, we encounter the following error:

./node_modules/.pnpm/[email protected]/node_modules/unist-util-visit-parents/lib/index.js Attempted import error: 'color' is not exported from 'unist-util-visit-parents/do-not-use-color' (imported as 'color').

image image

Affected runtime and version

[email protected]

Affected package manager and version

[email protected]

Affected OS and version

MacOS Sonoma 14.1.2

Build and bundle tools

Next.js

daveleee avatar Dec 07 '23 17:12 daveleee

welcome @daveleee! 👋 Sorry you ran into a spot of trouble.

I can't replicate the issue with the steps you provided. It works fine https://stackblitz.com/edit/stackblitz-starters-j7cta1?file=app%2Fpage.tsx You most likely have a misconfigured Next.js instance or are experiencing a bug with pnpm.

If you do believe it is an issue in retext-keywords please share a reproducible example. Otherwise this will be closed as an external issue.

ChristianMurphy avatar Dec 07 '23 17:12 ChristianMurphy

Hi! Thanks for taking the time to contribute! This has been marked by a maintainer as needing a reproduction: It’s not yet clear whether this is a problem. Here are a couple tips:

  • Thoroughly document how to reproduce the problem, in steps or with code
  • Don’t link to your complete project: make the repro as tiny as possible, preferrably with only the problematic project in question
  • Make sure you’re on the latest versions of projects (and node/npm/yarn!)
  • The best issue report is a failing test proving it

Thanks, — bb

github-actions[bot] avatar Dec 07 '23 17:12 github-actions[bot]