Closed
Description
- I confirm that this is a issue rather than a question.
Bug report
When I'm trying to run vuepress I'm getting this error:
(node:20384) UnhandledPromiseRejectionWarning: TypeError: cli.command(...).option(...).option
(...).option(...).option(...).option(...).option(...).option(...).option(...).action is not a
function
at module.exports (/home/larionov/projects/ui-packages/components/nav/node_modules/vuepre
ss/lib/registerCoreCommands.js:26:6)
After investigation I realized that a wrong version of cac
is used. We have bili
as a dependency, which have cac@4 as dependency, while @vuepress/core requires cac@6.
I think the error is happening because cac
is used in the 'vuepress` package, but not listed there as a dependency. It is only listed as a dependency in the @vuepress/core package.
Version
1.0.0-alpha.30
Steps to reproduce
I prepared a minimal repo to reproduce the errror:
https://github.com/larionov/reproduce-vuepress-cac-bug
clone https://github.com/larionov/reproduce-vuepress-cac-bug
cd reproduce-vuepress-cac-bug
yarn
yarn docs:dev
What is expected?
vuepress build docs
What is actually happening?
vuepress throws and error:
⋊> ~/p/u/c/nav on fix/NOJIRA-nav-fix-requests ⨯ yarn docs:dev 13:11:49
yarn run v1.12.3
that collides with a dependency in "devDependencies" of the same name with version "^2.3.0"
$ vuepress dev ./
(node:20384) UnhandledPromiseRejectionWarning: TypeError: cli.command(...).option(...).option
(...).option(...).option(...).option(...).option(...).option(...).option(...).action is not a
function
at module.exports (/home/larionov/projects/ui-packages/components/nav/node_modules/vuepre
ss/lib/registerCoreCommands.js:26:6)
at beforeParse (/home/larionov/projects/ui-packages/components/nav/node_modules/vuepress/
vuepress.js:16:5)
at CLI (/home/larionov/projects/ui-packages/components/nav/node_modules/vuepress/lib/util
.js:22:24)
at Object.<anonymous> (/home/larionov/projects/ui-packages/components/nav/node_modules/vu
epress/vuepress.js:12:1)
at Module._compile (internal/modules/cjs/loader.js:678:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
at Module.load (internal/modules/cjs/loader.js:589:32)
at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
at Function.Module._load (internal/modules/cjs/loader.js:520:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:719:10)
at startup (internal/bootstrap/node.js:228:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:575:3)
(node:20384) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error origin
ated either by throwing inside of an async function without a catch block, or by rejecting a
promise which was not handled with .catch(). (rejection id: 2)
(node:20384) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In th
e future, promise rejections that are not handled will terminate the Node.js process with a n
on-zero exit code.
Done in 0.99s.
Other relevant information
- Your OS: linux
- Node.js version: v10
- Browser version:
- Is this a global or local install? local
- Which package manager did you use for the install? yarn
Metadata
Metadata
Assignees
Labels
No labels