Git Product home page Git Product logo

Comments (7)

meteorlxy avatar meteorlxy commented on August 23, 2024

Not familiar with yarn v2 yet.

from core.

Mister-Hope avatar Mister-Hope commented on August 23, 2024

Meanwhile, I am having some troubles with yarn 1.

When requiring vuepress in a workspace with vuepressV1:
image

{
  "name": "demo",
  "scripts": {
    "build": "vuepress build src",
    "clean-serve": "vuepress dev src --no-cache",
    "eject": "vuepress eject-hope src",
    "serve": "vuepress dev src"
  },
  "devDependencies": {
    "vuepress": "1.7.1",
  }
}

But I can not get a bin folder with vuepress 2

image

I both tried on Windows20H2 and WSL2(Ubuntu 20.04) with Node 14.15.3 and Yarn 1.22.5.

I am able to run vuepress in the root folder(the bin folder has vuepress), while the projects inside it are catching issues.

Could you check the package.json for vuepress2?

I think

  "bin": {
    "vuepress": "lib/cli.js"
  },

is required for everything to work fine. @meteorlxy

And if it's an issue, would you mind publishing a new version please?

P.S.: That may be the reason why I cannot found the vuepress command with Yarn2.

from core.

meteorlxy avatar meteorlxy commented on August 23, 2024

The vuepress command is provided by @vuepress/cli.

So the @vuepress/cli that required by vuepress did not take effect when using yarn v2? 🤔

from core.

Mister-Hope avatar Mister-Hope commented on August 23, 2024

The vuepress command is provided by @vuepress/cli.

So the @vuepress/cli that required by vuepress did not take effect when using yarn v2? 🤔

It's even not working with yarn V1 in my case. The screenshot I provides are all with v1

Edit: wait, I will try requiring @vuepress/cli and see if it works

from core.

Mister-Hope avatar Mister-Hope commented on August 23, 2024

I think we should metion it through docs, that if we are using workspace, we should require @vuepress/cli to get the vuepress command. @meteorlxy Or we should probably make some changes to let the bin generated by the vuepress package and remain the cli file in @vuepress/cli

from core.

Mister-Hope avatar Mister-Hope commented on August 23, 2024

I am afraid the yarnV2 issue is related to it too. Yarn 2 only extracts command which is directly required by the project.

from core.

meteorlxy avatar meteorlxy commented on August 23, 2024

We need to confirm if the fix works in next release

from core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.