You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
kahboom opened this issue
Jun 14, 2018
· 4 comments
Assignees
Labels
cat/bugA bug which needs fixingcat/buildFor issues which have relevance for the build systemgroup/uiUser interface SPA, talking to the REST backendprio/p2The priority of a bug. p1 means low
NOTE: The following only applies if you are using Node 10 (not LTS) + Yarn v1.7.0. The second error will also occur if upath is somewhere in the dependency tree.
This is a...
[ ] Feature request
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Documentation issue or request
The problem
Was just minding my business, installing some new packages with my legacy Yarn, and got prompted by Yarn to upgrade to v1.7.0. I usually hesitate, but said, hey, why not, life's too short..
Suddenly, yarn install started failing any time you add a new package to package.json, which was sad for me because that's exactly what I needed to do.
The errors/warnings:
(node:20616) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
error upath@1.0.4: The engine "node" is incompatible with this module. Expected version ">=4 <=9".
error Found incompatible module.
Huh? I don't know even this module, and it's already telling me what Node engine version I need to use, so much that it is telling Yarn not to install anything until I do what it says.
Expected behavior
No errors on yarn install? The first was just a deprecation warning and likely wasn't failing the install, but was still driving me crazy. The second one, well,yarn install should install npm packages without failing, despite whatever engine version is specified.
Also please never ever purposefully break forward compatibility by enforcing something like node <= X.
Just stop it, people.
Tasks involved / Steps to Reproduce
Test with v.1.2.0 or whatever I was using before, and see no problems.
Upgrade to Yarn v.1.7.0, the latest and greatest.
Pretend to add a new package to package.json. Okay, actually add it.
Run yarn install.
Solutions/Workarounds
First Error:
No idea, but using yarn from npm seemed to fix it completely: npm i -g yarn && yarn install
Btw, this error wasn't even super obvious that it was related to Webpack until I did NODE_OPTIONS=--trace-warnings yarn outdated.
Second Error:
Downgrade to v1.6.0 or whatever version you were using that worked.
If you use Homebrew, you need to look at the commit history for the Ruby file for the formula if you don't already have that version installed (my most "recent" was v1.2.0, so was looking for something more.. modern). Also, not every formula supports multiple versions. AND you may need to unlink to then be able to switch symlinks using brew switch yarn@<version>. Anyway, nty..
Nuke everything. rm yarn.lock && rm -rf node_modules && yarn cache clean, then yarn install and pray to Lady Gaga that it all works..
Directly edit the yarn.lock file by removing the portion that references upath if you are not really using the module. But then again, why are we editing yarn.lock manually?
Tell Yarn globally that it should know better: yarn config set ignore-engines true -g
Tell Yarn locally that it should know better.
The third one seems to work fine, but I'm testing out the 4th option, which may involve adding a .yarnrc to the UI root.
tl;dr
So, for now, 1) install using yarn from npm to get rid of the deprecation warning, 2) set Yarn global configuration setting to ignore engines, then you can yarn install like normal again.
The text was updated successfully, but these errors were encountered:
Probably worth mentioning that some of this is also related to whatever node version you have installed, i.e. 10.x. On an LTS (8.x) version of node this doesn't seem to happen, or at least I haven't run into it...
paoloantinori
added
cat/bug
A bug which needs fixing
group/ui
User interface SPA, talking to the REST backend
prio/p1
The priority of a bug. p1 means high
cat/build
For issues which have relevance for the build system
and removed
notif/triage
The issue needs triage. Applied automatically to all new issues.
labels
Jul 4, 2018
@zregvart - This is because you are on node v8, not v10.x. But there is a workaround with yarn install --force. Not ideal, but to me is better than modifying the yarn.lock manually, or running some weird Yarn commands to only upgrade those dependencies.
Closing for now as this isn't a big deal, just run yarn install --force if you upgrade Node to resolve this and then run into some node-sass issues when running yarn install.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
cat/bugA bug which needs fixingcat/buildFor issues which have relevance for the build systemgroup/uiUser interface SPA, talking to the REST backendprio/p2The priority of a bug. p1 means low
NOTE: The following only applies if you are using Node 10 (not LTS) + Yarn v1.7.0. The second error will also occur if
upath
is somewhere in the dependency tree.This is a...
The problem
Was just minding my business, installing some new packages with my legacy Yarn, and got prompted by Yarn to upgrade to
v1.7.0
. I usually hesitate, but said, hey, why not, life's too short..Suddenly,
yarn install
started failing any time you add a new package topackage.json
, which was sad for me because that's exactly what I needed to do.The errors/warnings:
Huh? I don't know even this module, and it's already telling me what Node engine version I need to use, so much that it is telling Yarn not to install anything until I do what it says.
Expected behavior
No errors on
yarn install
? The first was just a deprecation warning and likely wasn't failing the install, but was still driving me crazy. The second one, well,yarn install
should install npm packages without failing, despite whatever engine version is specified.As Jan says in this issue anodynos/upath#14 (comment):
Just stop it, people.
Tasks involved / Steps to Reproduce
Test with v.1.2.0 or whatever I was using before, and see no problems.
package.json
. Okay, actually add it.yarn install
.Solutions/Workarounds
First Error:
No idea, but using yarn from npm seemed to fix it completely:
npm i -g yarn && yarn install
Btw, this error wasn't even super obvious that it was related to Webpack until I did
NODE_OPTIONS=--trace-warnings yarn outdated
.Second Error:
brew switch yarn@<version>
. Anyway, nty..rm yarn.lock && rm -rf node_modules && yarn cache clean
, thenyarn install
and pray to Lady Gaga that it all works..yarn.lock
file by removing the portion that referencesupath
if you are not really using the module. But then again, why are we editingyarn.lock
manually?yarn config set ignore-engines true -g
The third one seems to work fine, but I'm testing out the 4th option, which may involve adding a
.yarnrc
to the UI root.tl;dr
So, for now, 1) install using yarn from npm to get rid of the deprecation warning, 2) set Yarn global configuration setting to ignore engines, then you can
yarn install
like normal again.The text was updated successfully, but these errors were encountered: