Docz: v2: yarn as undocumented dependency

Created on 19 Jul 2019  路  12Comments  路  Source: doczjs/docz

Bug Report

npm run docz:dev fails due to missing yarn installation.

To Reproduce

  1. Dev maschine without yarn
  2. run npm run docz:dev
  3. See error

docz-yarn

Expected behavior

docz should run either with npm or yarn.

Environment

  • Ubuntu 19.04
  • node 12.4.0
  • npm 6.10.1

Additional context/Screenshots
I think its here: https://github.com/pedronauck/docz/blob/master/core/docz-core/src/commands/serve.ts

Is this something that will probably change in upcoming rcs? I am willing to help here.

docs enhancement v2

Most helpful comment

Yes it would great to mention that in the documentation.

OR

Even better, not rely on yarn for that (?). We are not using yarn at work. I know I could "just install it" but I think it would be better with rely on it.

All 12 comments

Yes it would great to mention that in the documentation.

OR

Even better, not rely on yarn for that (?). We are not using yarn at work. I know I could "just install it" but I think it would be better with rely on it.

Yeah, same issue here. Would be great not to rely on yarn for this.

Hi guys, sorry the too late response, I was on vacation so I couldn't see any issues until now. I'll try to figure out this and fix in order to launch in the stable v2 馃檹

I think this would be great if this didn't rely on yarn. Is this be something I could help get going? I was looking through the codebase and a lot of the tasks do rely on yarn, e.g. linting. Is the plan to just move the external running scripts away from yarn?

I have gotten this far: https://github.com/pedronauck/docz/commit/c971e633d37f78396ca766a0691e11152084048e

But I am looking on how to reference the prebuild of this locally via npm. I have tried the following from another repo: "docz": "file:../docz/core/docz", but I am not sure it is correct. If anyone could give me a hand with the local building that would be great.

I have gotten this far: c971e63

But I am looking on how to reference the prebuild of this locally via npm. I have tried the following from another repo: "docz": "file:../docz/core/docz", but I am not sure it is correct. If anyone could give me a hand with the local building that would be great.

Hi, I can try to help. But I am not sure what you mean by prebuilding locally? What's the scenario exactly?

Hi @jesperorb - I have a way of checking that this is working locally now. Basically what I meant is how could I test a version of the docz which I am making changes to locally.

I have modified the public-facing scripts in a branch to not reference yarn. But I think installing is the problem, this is because of yarn's packages resolve subfolders. Maybe there is a way to do this via npm before publishing - I thought that is what npm run packages/lerna was for?

When you install my branch from another repository via yarn it works fine but while using npm it runs into an error with gatsby being installed properly. If you want to test this out you can pull my branch or sha: https://github.com/doczjs/docz/commit/3747e7966e3b670baa04677e6cffc1842862f7fe (please ignore the package.json file rewrites for now)

@MountainDrew
Ah, I understand what you mean. I'm gonna check out your branch this week and have a look. Not sure I personally can solve it but we have this as an important issue to solve to v2.0.

@jesperorb - let me know if you need any help. Happy to look into a way of fixing these dependencies on an npm install over yarn

@jesperorb - let me know if you need any help. Happy to look into a way of fixing these dependencies on an npm install over yarn

You could rebase your branch against master as it is far behind and then you could open a PR against docz master branch (either as a regular PR or draft).

Starting from 2.0.0-rc.68 all external facing yarn usage has been replaced with npm.

It's now possible to use docz without having yarn installed.

Note that yarn is still required for docz development but it is documented as a dependency here : https://github.com/doczjs/docz/blob/master/CONTRIBUTING.md#pre-requisites

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davidtaboas picture davidtaboas  路  35Comments

colshacol picture colshacol  路  23Comments

kachkaev picture kachkaev  路  31Comments

tamagokun picture tamagokun  路  23Comments

maxguzenski picture maxguzenski  路  24Comments