Vuepress: Error: Cannot find module 'markdown-it-container' in v1.0.0-alpha.41

Created on 2 Mar 2019  Â·  4Comments  Â·  Source: vuejs/vuepress




  • [x] I confirm that this is an issue rather than a question.




Bug report

Thank you for your quick support so far.

There appears to be a bug in v1.0.0-alpha.41 related to missing dependency which prevents the vuepress CLI from starting. [The issue is resolved by installing the missing dependency.]

Note: This does not seem to be related to the other semi-recent markdown-it-container issue https://github.com/vuejs/vuepress/issues/1251.

Version

v1.0.0-alpha.41

Steps to reproduce

$ mkdir vuepress-test && cd vuepress-test
$ yarn add vuepress@next
...
✨  Done in 15.71s.
$ cat package.json
{
  "dependencies": {
    "vuepress": "^1.0.0-alpha.41"
  }
}
$ yarn run vuepress --version
yarn run v1.13.0
warning package.json: No license field
$ /Users/taylor/vuepress-test/node_modules/.bin/vuepress --version
internal/modules/cjs/loader.js:611
    throw err;
    ^

Error: Cannot find module 'markdown-it-container'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:609:15)
    at Function.Module._load (internal/modules/cjs/loader.js:535:25)
    at Module.require (internal/modules/cjs/loader.js:663:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/taylor/vuepress-test/node_modules/@vuepress/markdown/lib/markdownSlotsContainers.js:1:81)
    at Module._compile (internal/modules/cjs/loader.js:734:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
    at Module.load (internal/modules/cjs/loader.js:626:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
    at Function.Module._load (internal/modules/cjs/loader.js:558:3)
    at Module.require (internal/modules/cjs/loader.js:663:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/taylor/vuepress-test/node_modules/@vuepress/markdown/index.js:17:39)
    at Module._compile (internal/modules/cjs/loader.js:734:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
    at Module.load (internal/modules/cjs/loader.js:626:32)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
$ yarn add markdown-it-container
...
✨  Done in 4.44s.
$ yarn run vuepress --version
yarn run v1.13.0
warning package.json: No license field
$ /Users/taylor/vuepress-test/node_modules/.bin/vuepress --version
vuepress/1.0.0-alpha.41 darwin-x64 node-v11.9.0
✨  Done in 0.87s.

What is expected?

The vuepress CLI starts normally.

What is actually happening?

The vuepress CLI fails to start throwing an error about the markdown-it-container module being missing.

Other relevant information

  • Your OS: macOS
  • Node.js version: v11.9.0 / yarn version: 1.13.0
  • Browser version: n/a
  • Is this a global or local install? local
  • Which package manager did you use for the install? yarn
  • Does this issue occur when all plugins are disabled? yes

Most helpful comment

PR created at #1389.

All 4 comments

Sorry for my mistake! 😢

PR created at #1389.

Yes, I also got this error with Vuepress installed globally. yarn global add markdown-it-container worked around the error for me, but hopefully the PR fixes the root issue.

It's now fixed in 1.0.0-alpha.42.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sankincn picture sankincn  Â·  3Comments

kid1412621 picture kid1412621  Â·  3Comments

AleksejDix picture AleksejDix  Â·  3Comments

shaodahong picture shaodahong  Â·  3Comments

alinnert picture alinnert  Â·  3Comments