Code-server: install yarn if not already available

Created on 6 Mar 2019  路  7Comments  路  Source: cdr/code-server

Since all node installations come with npm, probably forcing users to install yarn if they are happy with npm (since they both do the same) is not desirable and will decrease reach. It would be better if yarn could be kept as a choice since it's not the default or standar.

Fallback could be implemented as mentioned in this gist by @jsynowiec's comment:
https://gist.github.com/jsynowiec/b67221be8f34ac531f17c69fdaf1efbe

Most helpful comment

We can provide a fallback to npm for sure. Might just be better to install yarn project-wide then use npx.

All 7 comments

Project is merely a standard NPM still, so you can use it without yarn. I don't get where this is coming, all yarn projects are npm-compatible (exceptions are those who use yarn workspaces).

@sr229 try to run the scripts (for example npm install) without having yarn installed and you'll get where its coming from (hint: "yarn not found")

We can provide a fallback to npm for sure. Might just be better to install yarn project-wide then use npx.

That's also a good option indeed

NPM cannot read yarn's yarn.lock which shall be required for consistent environment. I don't think a fallback to npm is a good idea.

+1 for install yarn project-wide.

Project is merely a standard NPM still, so you can use it without yarn. I don't get where this is coming, all yarn projects are npm-compatible (exceptions are those who use yarn workspaces).

Yarn also supports alias.

Marking as wontfix. Already documented as a prerequisite.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

infogulch picture infogulch  路  3Comments

avelino picture avelino  路  3Comments

korzq picture korzq  路  3Comments

justmao945 picture justmao945  路  3Comments

Arsaev picture Arsaev  路  3Comments