yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.37k stars 2.72k forks source link

Cannot update to latest version of a dependency #6325

Closed npomfret closed 5 years ago

npomfret commented 5 years ago

Having problems getting latest version of dependencies. I ran yarn upgrade-interactive --latest and it updated my package.json as expected. For example, the ccxt library changed from "ccxt": "^1.17.109" to "ccxt": "^1.17.204".

I ran yarn, and yarn install, and deleted yarn.lock and ran it all again, but no matter what I do the version of the ccxt library inside my node_modules dir remains at "version": "1.17.109" but it should be 1.17.204.

The yarn.lock file does appear to have the correct version:

ccxt@^1.17.204:
  version "1.17.204"
  resolved "https://registry.yarnpkg.com/ccxt/-/ccxt-1.17.204.tgz#91a259196d3b38939af4ddb38c2cd3aa56ac39f2"

What is going on here?

FYI - npm install appears to work perfectly.

yarn --version
1.3.2
arcanis commented 5 years ago

I need a full repro to investigate. That includes a minimal package.json. Thanks 🙂

npomfret commented 5 years ago
{
  "devDependencies": {
    "chai": "^4.1.2",
    "mocha-each": "^1.1.0",
    "nodemon": "^1.18.0"
  },
  "dependencies": {
    "anx": "^0.1.0",
    "assert": "^1.4.1",
    "bignumber.js": "^7.2.1",
    "bintrees": "^1.0.2",
    "bitfinex-api-node": "^2.0.0-beta.1",
    "body-parser": "^1.18.3",
    "btoa": "^1.2.1",
    "ccxt": "^1.17.204",
    "cexio-api-node": "^1.2.0",
    "chai-as-promised": "^7.1.1",
    "commander": "^2.16.0",
    "compression": "^1.7.3",
    "csv": "^3.1.0",
    "eventsource": "^1.0.7",
    "express": "^4.16.3",
    "firebase": "^5.4.1",
    "firebase-admin": "^6.0.0",
    "fs": "0.0.1-security",
    "gdax": "^0.8.0",
    "gdax-trading-toolkit": "^0.3.1",
    "jsonic": "^0.3.0",
    "jssha": "^2.3.1",
    "mathjs": "^5.1.1",
    "mocha": "^5.2.0",
    "node-binance-api": "^0.8.0",
    "node-schedule": "^1.3.0",
    "poloniex-api-node": "^1.9.0",
    "pusher": "^2.1.3",
    "pusher-client": "^1.1.0",
    "request": "^2.87.0",
    "signalr-client": "0.0.18",
    "socket.io": "^2.1.1",
    "socket.io-client": "^2.1.1",
    "sse": "0.0.8",
    "url": "^0.11.0",
    "ws": "^6.0.0",
    "zlib": "^1.0.5"
  },
  "scripts": {}
}
arcanis commented 5 years ago

I don't have this issue. Try to upgrade to the latest releases, 1.3.2 is quite old.

npomfret commented 5 years ago

Um, I tried:

yarn --version
1.3.2

npm install --global yarn
.nvm/versions/node/v8.11.3/bin/yarnpkg -> .nvm/versions/node/v8.11.3/lib/node_modules/yarn/bin/yarn.js
.nvm/versions/node/v8.11.3/bin/yarn -> .nvm/versions/node/v8.11.3/lib/node_modules/yarn/bin/yarn.js
+ yarn@1.9.4
updated 1 package in 0.657s

yarn --version
1.3.2

What am I doing wrong here?

npomfret commented 5 years ago

Closing for now. Think I'll stick with npm

arcanis commented 5 years ago

What am I doing wrong here?

Well I don't know, that's your system. My guess is that you installed yarn globally a long time ago, and that it's still in your $PATH variable. Just run which yarn to figure out which binary gets called.