elm-lang / elm-package

Command line tool to share Elm libraries
BSD 3-Clause "New" or "Revised" License
214 stars 66 forks source link

Cannot find module after installing it #255

Open ghost opened 7 years ago

ghost commented 7 years ago
$ elm package install krisajenkins/remotedata
To install krisajenkins/remotedata I would like to add the following
dependency to elm-package.json:

    "krisajenkins/remotedata": "4.0.1 <= v < 5.0.0"

May I add that to elm-package.json for you? [Y/n] y

Some new packages are needed. Here is the upgrade plan.

  Install:
    elm-lang/http 1.0.0
    krisajenkins/remotedata 4.0.1

Do you approve of this plan? [Y/n] y
Starting downloads...

  ● elm-lang/http 1.0.0
  ● krisajenkins/remotedata 4.0.1

Packages configured successfully!

elm-lang/http has been installed.

$ elm make MultiSelect.elm --output elm.js
I cannot find module 'Http'.

Module 'MultiSelect' is trying to import it.

Potential problems could be:
  * Misspelled the module name
  * Need to add a source directory or new dependency to elm-package.json
$ cat elm-package.json
{
    ...
    "source-directories": [
        "."
    ],
    "exposed-modules": [],
    "dependencies": {
        "elm-lang/core": "5.0.0 <= v < 6.0.0",
        "elm-lang/html": "2.0.0 <= v < 3.0.0",
        "krisajenkins/remotedata": "4.0.1 <= v < 5.0.0"
    },
    "elm-version": "0.18.0 <= v < 0.19.0"
}

There's no elm-lang/http in dependencies. Adding it by hand gets rid of the error message. I'd expect it to be there though already.

process-bot commented 7 years ago

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.