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

[docus] error when trying Yarn dev #1834

Open
djennadhamza opened this issue Oct 7, 2021 · 8 comments
Open

[docus] error when trying Yarn dev #1834

djennadhamza opened this issue Oct 7, 2021 · 8 comments
Labels
help wanted assign yourself, add in progress and work away

Comments

@djennadhamza
Copy link

Hi ,
I tried to run

yarn dev

but i get this error:

✖ Nuxt Fatal Error │
│ │
│ Error: Cannot find module 'pathe' │
│ Require stack: │
│ - ~\nuxtjs.org\node_modules@docus\theme\node_modules@nuxt\kit\dist\index.mjs

Modified the "pathe" to "path" in index.mjs file
Then i get this error:
✖ Nuxt Fatal Error │
│ │
│ Error: Cannot find module 'mlly' │
│ Require stack: │
│ - ~\nuxtjs.org\node_modules@docus\theme\node_modules@nuxt\kit\dist\index.mjs

what i'm doing wrong ?

Copy link
Contributor

Hi @djennadhamza
Did you try this on main? And are you sure your yarn.lock has not been affected?

@djennadhamza
Copy link
Author

Yes i tried this on main ,
How to know yarn.lock has affected.

Copy link
Contributor

Do you have any diff in your version control about yarn.lock? Just to make sure it did not bump docus version.
If so, discard the changes of yarn.lock and yarn install --force. And if it still happens, we may actually have an issue.
@Tahul will be able to dig into this issue 😊

@djennadhamza
Copy link
Author

djennadhamza commented Oct 7, 2021

I found in some articles that this problem related to Node.js . Then I upgraded my version (12.22.0 to 14.18.0) & i did yarn install --force command but still another error message appeared: ( this is the logs)
$ yarn dev
yarn run v1.22.15
$ nuxt dev
i [email protected] running with config: windi.config.js nuxt:windicss 19:43:50

╭───────────────────────────────────────╮
│ │
│ Nuxt @ v2.16.0-27146894.17bbb21b │
│ │
│ ▸ Environment: development │
│ ▸ Rendering: client-side │
│ ▸ Target: static │
│ │
│ Listening: http://localhost:4000/
│ │
│ ⚡ Vite Mode Enabled (v0.1.2) │
│ │
│ 💄 Theme: defaultTheme │
│ │
╰───────────────────────────────────────╯

i Preparing project for development 19:43:53
i Initial build may take a while 19:43:53

ERROR Cannot set property 'next' of undefined 19:43:58

at subcontent (node_modules\micromark\dist\util\subtokenize.js:179:52)
at subtokenize (node_modules\micromark\dist\util\subtokenize.js:60:23)
at postprocess (node_modules\micromark\dist\postprocess.js:6:11)
at fromMarkdown (node_modules\mdast-util-from-markdown\dist\index.js:25:5)
at parse (node_modules\remark-parse\index.js:13:12)
at Function.parse (node_modules@docus\core\node_modules\unified\index.js:271:12)
at pipelineParse (node_modules@docus\core\node_modules\unified\index.js:23:16)
at wrapped (node_modules@docus\core\node_modules\trough\wrap.js:25:19)
at next (node_modules@docus\core\node_modules\trough\index.js:57:24)
at Object.run (node_modules@docus\core\node_modules\trough\index.js:31:10)
at executor (node_modules@docus\core\node_modules\unified\index.js:362:16)
at Function.process (node_modules@docus\core\node_modules\unified\index.js:357:5)
at node_modules@docus\core\dist\index.js:546:26
at new Promise ()
at generateBody (node_modules@docus\core\dist\index.js:541:10)
at async markdown (node_modules@docus\core\dist\index.js:1880:16)

i Discovered Components: .nuxt/components/readme.md 19:44:18
√ Builder initialized 19:44:18
√ Nuxt files generated 19:44:25

FATAL Cannot set property 'next' of undefined 19:44:38

at subcontent (node_modules\micromark\dist\util\subtokenize.js:179:52)
at subtokenize (node_modules\micromark\dist\util\subtokenize.js:60:23)
at postprocess (node_modules\micromark\dist\postprocess.js:6:11)
at fromMarkdown (node_modules\mdast-util-from-markdown\dist\index.js:25:5)
at parse (node_modules\remark-parse\index.js:13:12)
at Function.parse (node_modules@docus\core\node_modules\unified\index.js:271:12)
at pipelineParse (node_modules@docus\core\node_modules\unified\index.js:23:16)
at wrapped (node_modules@docus\core\node_modules\trough\wrap.js:25:19)
at next (node_modules@docus\core\node_modules\trough\index.js:57:24)
at Object.run (node_modules@docus\core\node_modules\trough\index.js:31:10)
at executor (node_modules@docus\core\node_modules\unified\index.js:362:16)
at Function.process (node_modules@docus\core\node_modules\unified\index.js:357:5)
at node_modules@docus\core\dist\index.js:546:26
at new Promise ()
at generateBody (node_modules@docus\core\dist\index.js:541:10)
at async markdown (node_modules@docus\core\dist\index.js:1880:16)

╭────────────────────────────────────────────────────────╮
│ │
│ ✖ Nuxt Fatal Error │
│ │
│ TypeError: Cannot set property 'next' of undefined │
│ │
╰────────────────────────────────────────────────────────╯

error Command failed with exit code 1.
yarn-error.log

in readme.md on setup section please change npm install to yarn install. Because the npm doesn't work for me.

@smarroufin smarroufin added the help wanted assign yourself, add in progress and work away label Oct 8, 2021 — with Volta.net
@dandanXO
Copy link

dandanXO commented Oct 9, 2021

I think is OS problem.

I use Windows have same issue.

but mac and linux is fine.
@djennadhamza

@samehdoush
Copy link

samehdoush commented Oct 9, 2021

I have the same issue

yarn : 1.22.15
npm : 6.14.15
node : v12.22.5
os : Windows 11

with npm :
✖ Nuxt Fatal Error │
│ │
│ Error: Cannot find module 'pathe' │
│ Require stack: │
│ - ~\nuxtjs.org\node_modules@docus\theme\node_modules@nuxt\kit\dist\index.mjs

with yarn :
Cannot find module 'fs/promises' 11:38:22
Require stack:

  • ~\nuxtjs.org\node_modules@docus\core\dist\index.js

What should we do to solve this problem?

@djennadhamza
Copy link
Author

I have the same issue

yarn : 1.22.15 npm : 6.14.15 node : v12.22.5 os : Windows 11

with npm : ✖ Nuxt Fatal Error │ │ │ │ Error: Cannot find module 'pathe' │ │ Require stack: │ │ - ~\nuxtjs.org\node_modules@docus\theme\node_modules@nuxt\kit\dist\index.mjs

with yarn : Cannot find module 'fs/promises' 11:38:22 Require stack:

  • ~\nuxtjs.org\node_modules@docus\core\dist\index.js

What should we do to solve this problem?

Download the latest stable Node version (Node v12 doesn't have the fs/promises. This should have the 'fs/promises' module and will fix the issue.
But still the other issue with TypeError: Cannot set property 'next' of undefined

@djennadhamza
Copy link
Author

I think is OS problem.

I use Windows have same issue.

but mac and linux is fine. @djennadhamza

I'll try to install linux on virtual machine and give it a chance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted assign yourself, add in progress and work away
Projects
None yet
Development

No branches or pull requests

4 participants