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

vuepress conflicts with bili installation #1183

Closed
1 task done
larionov opened this issue Jan 11, 2019 · 1 comment
Closed
1 task done

vuepress conflicts with bili installation #1183

larionov opened this issue Jan 11, 2019 · 1 comment

Comments

@larionov
Copy link
Contributor

larionov commented Jan 11, 2019

  • 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
larionov added a commit to larionov/vuepress that referenced this issue Jan 11, 2019
@larionov
Copy link
Contributor Author

Workaround:
add cac@6 as a dev dependency to your project.

@ulivz ulivz closed this as completed in d160e68 Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant