Closed develop7 closed 6 years ago
Adding the PublishToNpm
tag as I believe it's the correct solution.
I no longer see this error on 3.0.1. The npm outdated -g
command succeeds.
@zploskey just have 3.0.1 installed, the issues's still there
Can you provide some more information your node installation and operating system?
@zploskey openSUSE Tumbleweed 20171030 x86_64; nodejs v8.8.1; npm v5.4.2
$ cat ~/.npmrc
prefix = /home/develop7/.npm
also the debug log mentioned in npm output 2017-11-01T04_11_49_143Z-debug.log
Hope that helps!
Thanks for the information. When you upgraded to 3.0.1 did you npm remove -g reason-cli
before executing the install command? I understand this may be necessary, and is what I did after initially having this problem on Fedora 26. Does removing and installing it again make any difference?
I see the problem on linux with reason-cli 3.0.1. I think it's just going to happen until we push to npm instead of https urls.
Seems likely. I wonder if I'm not affected because I downloaded first and installed from my local filesystem. It seems like this might be a bug in npm, honestly, but I don't know if they care about supporting installs from anywhere but an npm repository.
I do believe it's an npm bug. Though they have added some nice support for git repo deps in the latest release.
@jordwalke Yep, npm i -g 'git+https://github.com/reasonml/reason-cli.git#3.0.1-bin-darwin'
doesn't break npm outdated --global
. Although the npm outdated
now suggest updating to git
version.
I think I'd go with yarn global
approach. Being not affected by #33 is an added bonus.
Using yarn gets you the joy of rebuilding ocaml and bs-platform repeatedly, unfortunately. Maybe for now we should switch the recommendation to use the git tag as you suggest.
@zploskey are you seeing this with 3.0.x
releases?
@andreypopp Yes, but only when I installed with a tarball like this:
zach@znbk:~$ node --version
v8.9.0
zach@znbk:~$ npm --version
5.5.1
zach@znbk:~$ npm install -g https://github.com/reasonml/reason-cli/archive/3.0.1-bin-linux.tar.gz
[... installs ok ...]
*** Decompressing artefacts...
*** Relocating artefacts to the final destination...
+ reason-cli@3.0.1
added 1 package in 38.61s
zach@znbk:~$ npm outdated -g
npm ERR! code E404
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/reason-cli
npm ERR! 404
npm ERR! 404 'reason-cli' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/zach/.npm/_logs/2017-11-01T22_32_43_195Z-debug.log
But if I then do this,
zach@znbk:~$ npm remove -g reason-cli
removed 1 package in 0.506s
zach@znbk:~$ npm install -g 'git+https://github.com/reasonml/reason-cli.git#3.0.1-bin-linux'
[snip]
+ reason-cli@3.0.1
added 1 package in 43.779s
zach@znbk:~$ npm outdated -g
Package Current Wanted Latest Location
reason-cli 3.0.1 git git
Since it's installed from the git repo it's expected that it would show that it's out of date. That seems preferable to breaking the command.
@zploskey sorry, I wasn't being clear. I was referring to your comment regarding installation with yarn:
Using yarn gets you the joy of rebuilding ocaml and bs-platform repeatedly, unfortunately. Maybe for now we should switch the recommendation to use the git tag as you suggest.
It should be fixed in 3.0.x
releases. It's a bug if not.
@andreypopp No worries, it was good to clarify when this bug is actually triggered and what alternatives we have. I can check the yarn issue out again too, but I don't think it's resolved based on experiencing it in the last few days. It's due how yarn handles native dependencies. See this issue: https://github.com/yarnpkg/yarn/issues/932 and https://github.com/BuckleScript/bucklescript/issues/2207
This is a duplicate: https://github.com/reasonml/reason-cli/issues/48
I installed 3.1.0 from the npm registry (according to the new documentation) on macOS. It worked fine but when I do npm outdated -g
I get the following:
Package Current Wanted Latest
reason-cli 3.1.0-darwin 3.1.0-linux 3.1.0-darwin
So it wants to replace my darwin version with the linux version. Not a major issue, but something to be careful with when you want to upgrade all global packages.
On Linux it says it "wants" the darwin version. The original problem in this issue has been fixed, as far as I can tell, by publishing to npm. Outdated is no longer broken, but it does show an extra entry.
@zploskey makes sense; closing
Repro:
npm install -g <URL-to-reason-cli-binary-release-archive>
npm outdated -g
Expected: the second command works as intended Instead: it fails with following output