elm-package icon indicating copy to clipboard operation
elm-package copied to clipboard

elm-package doesn't install a seemingly valid elm-package.json dependencies

Open n1k0 opened this issue 7 years ago • 7 comments

Using elm 0.18.0 installed from npm, using node v7.8.0 and npm v4.6.1.

In a new empty tmp directory, create a elm-package.json file with this content:

{
    "version": "1.0.0",
    "summary": "Bug reproduction",
    "repository": "https://github.com/foo/bar.git",
    "license": "MIT",
    "source-directories": ["."],
    "exposed-modules": [],
    "dependencies": {
      "elm-lang/core": "5.1.1 <= v < 6.0.0"
    },
    "elm-version": "0.18.0 <= v < 0.19.0"
}

Install:

$ elm-package install
Packages configured successfully!

Now look at the content of elm-stuff:

$ tree elm-stuff
elm-stuff
├── exact-dependencies.json
└── packages

1 directory, 1 file

Looks fine, right? Now inspect the packages folder, it's empty. And exact-dependencies.json exposes an empty object:

$ cat elm-stuff/exact-dependencies.json
{}%      

This started happening this morning after strange failures on Travis for the tooty project, where the test env couldn't be installed at all. I reduced the problem to the setup exposed above, which fails both on my machine and Travis.

I don't have a clue what triggered this behavior change, I didn't install anything new, yesterday everything was fine. Very, very strange.

n1k0 avatar May 25 '17 10:05 n1k0

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

process-bot avatar May 25 '17 10:05 process-bot

FWIW package.elm-lang.org is currently down http://downforeveryoneorjustme.com/http://package.elm-lang.org

n1k0 avatar May 25 '17 12:05 n1k0

I think I've hit the same issue, and the package server is up.

To replicate:

{
    "version": "1.0.0",
    "summary": "Sample Elm Test",
    "repository": "https://github.com/user/project.git",
    "license": "BSD-3-Clause",
    "source-directories": [
        "."
    ],
    "exposed-modules": [],
    "dependencies": {
        "elm-community/elm-test": "4.0.0 <= v < 5.0.0",
        "rtfeldman/node-test-runner": "4.0.0 <= v < 5.0.0"
    },
    "elm-version": "0.18.0 <= v < 0.19.0"
}

does not install anything but says it was successful, while just changing the versions

    "dependencies": {
        "elm-community/elm-test": "3.0.0 <= v < 4.0.0",
        "rtfeldman/node-test-runner": "3.0.0 <= v < 4.0.0"
    },

will return a valid upgrade plan. Weird.

renatomassaro avatar May 31 '17 23:05 renatomassaro

I'm seeing the same issues as above. Run: elm package install and see Packages configured successfully! as a response, but then see an empty packages directory. elm-package.json shown below:

{
    "version": "0.5.0",
    "summary": "XX",
    "repository": "XX",
    "license": "BSD3",
    "source-directories": [
        "./src"
    ],
    "exposed-modules": [],
    "dependencies": {
        "elm-lang/core": "5.1.1 <= v < 6.0.0",
        "elm-lang/html": "2.0.0 <= v < 3.0.0",
        "elm-lang/http": "3.0.1 <= v < 4.0.0",
        "simonh1000/elm-jwt": "5.2.1 <= v < 6.0.0"
    },
    "elm-version": "0.18.0 <= v < 0.18.1"
}

tdrach avatar Aug 29 '17 21:08 tdrach

I'm experiencing the same issue, but only on windows it seems. I do not have the same problem on OSX.

ringvold avatar Nov 07 '17 08:11 ringvold

Sooo...I got it working by deleting the tests folder and reinitializing with elm-test init. :thinking:

ringvold avatar Nov 07 '17 09:11 ringvold

I found that it seems to happen while there is an exact-dependencies.json file in the elm-stuff folder, removing it caused the install to prompt me for install again I had previously been committing it to git to preserve the resolved versions exactly, I suppose I will be removing it now though in order to allow for CI's to build my project

effervescentia avatar Mar 11 '18 22:03 effervescentia