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

Yarn support #44

Open
Apidcloud opened this issue Feb 10, 2018 · 10 comments
Open

Yarn support #44

Apidcloud opened this issue Feb 10, 2018 · 10 comments

Comments

@Apidcloud
Copy link

Good evening!

I've noticed yarn add [email protected] doesn't really add the binaries to node_modules/.bin, whereas npm does. Would it be possible to support yarn as well?

Thanks!

@aredridel
Copy link
Owner

Possibly! how does yarn install binaries?

@Apidcloud
Copy link
Author

Apidcloud commented Feb 11, 2018

You mean the command to do so? yarn add package_x.

the official website might be a little tricky to find as it's not the 1st result, at least for me (https://yarnpkg.com/en/)

Ah, please let me know if there's something I could contribute with in this matter. I think the current version of this vs. @8.9.4 is quite different (particularly index.js), but I'm willing to help 😄

@aredridel
Copy link
Owner

Mmm. I don't use yarn at all, so I'm not sure with how it differs from how npm installs packages. Where does it put binaries if not in node_modules/.bin?

(I can do the digging, but any help and context you can give will speed it up!)

@Apidcloud
Copy link
Author

Apidcloud commented Feb 11, 2018

It should be inside node_modules/.bin as well. When I use npm install [email protected], it shows that it runs installArchSpecificPackage.js, whereas yarn doesn't.

My first guess when I first noticed the issue, was whether it was running the preinstall script at all. But it's probably an issue within node-bin-setup index.js.

image

@aredridel
Copy link
Owner

Oh interesting! Does yarn generally skip scripts like that?

@Apidcloud
Copy link
Author

No, not really. Just did a quick test and it calls a "pre" script just fine.

@aredridel
Copy link
Owner

Interesting. I'll have to dig into why, unless someone else gets to it first!

@Apidcloud
Copy link
Author

Thanks a lot for taking the time to! 😄

cappadona added a commit to cul-it/signage that referenced this issue Mar 20, 2018
Use .nvmrc to indicate desired version for now. The `engines` object is
pretty much useless to anything outside of Heroku since it doesn't
enforce a strict requirement.

Investigated using the node package [1] to install a specific version of
the node binary as a requirement, but there's controversy over bloat
factor [2, 3] and it is not yet fully compatible with yarn [4].

[1] https://www.npmjs.com/package/node
[2] https://twitter.com/housecor/status/962347301456015360
[3] https://twitter.com/maybekatz/status/958157474397171712
[4] aredridel/node-bin-gen#44
cappadona added a commit to cul-it/signage that referenced this issue Mar 21, 2018
* Jump to node 9.8.0

Use .nvmrc to indicate desired version for now. The `engines` object is
pretty much useless to anything outside of Heroku since it doesn't
enforce a strict requirement.

Investigated using the node package [1] to install a specific version of
the node binary as a requirement, but there's controversy over bloat
factor [2, 3] and it is not yet fully compatible with yarn [4].

[1] https://www.npmjs.com/package/node
[2] https://twitter.com/housecor/status/962347301456015360
[3] https://twitter.com/maybekatz/status/958157474397171712
[4] aredridel/node-bin-gen#44

* Bump to node-sass 4.7.2

Node 9.8.0 was not happy with previous version lock (4.5.3).

* Upgrade to Nuxt 1.4.0

Previously running pre-production release.

Includes following adjustments:

* Tweak Nuxt config for eslint (passing context)

* Swap in `eslint-plugin-vue` for `eslint-plugin-html` & use it along
  with standard for base rules

* Fix alias for components to align with Nuxt 1.x [1]

* Export state as function for Vuex store, since using modules mode [2]

[1] https://nuxtjs.org/guide/directory-structure#aliases
[2] https://nuxtjs.org/guide/vuex-store#modules-mode

* Replace nuxt-helpers/axios with axios module

As indicated in initial implementation of fetching data back in 42d0f7e.

Nuxt modules have come a long way in the past year. Basically follow
the documentation [1] to swap out the helper for the module.

The module makes axios widely available across the app:

* plugins
* vuex store
* pages
* middleware
* other modules

But notice this does not include external utility files, which is a
necessity here for `utils/libcal.js`. The workaround was to pass
`this.$axios` from the store to the util as a param. Not sure this will
be the longterm solution since there are ongoing discussions in the
module repo on potential options on better sharing the configured axios
instance with external files.

[1] https://axios.nuxtjs.org

* Drop add package

Never used. Mistakenly introduced in ca06ecd as part of #20.

* Upgrade packages to latest

And satisfy unmet peer dependencies.

* Bump app version to 0.2.0
@vkrol
Copy link

vkrol commented Oct 21, 2018

The cause of the problem is yarnpkg/yarn#3421. The workaround is yarnpkg/yarn#3421 (comment).

@nicolo-ribaudo
Copy link

Note that this package doesn't work with PnP, which is the "algorithm" used by Yarn 2 and which is opt-in in yarn 1: yarnpkg/berry#637 (comment)

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

4 participants