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

ElmTest module not found

Open leahsteinberg opened this issue 9 years ago • 9 comments

It's definitely possible that I've missed something in installing this package, but I can't seem to get it to run! I've tried it with the node elm-test package, as well as by itself. Every time it says that it can't find the module. What should I do?

leahsteinberg avatar Nov 23 '15 21:11 leahsteinberg

What is the output from running elm-test init in an empty directory? For example, I've installed node-elm-test and I get the following output:

❯ elm-test init
Created elm-package.json
To install deadfoxygrandpa/elm-test I would like to add the following
dependency to elm-package.json:

"deadfoxygrandpa/elm-test": "3.0.0 <= v < 4.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:
deadfoxygrandpa/elm-test 3.0.0
elm-lang/core 3.0.0
laszlopandy/elm-console 1.0.2

Do you approve of this plan? (y/n) y
Downloading deadfoxygrandpa/elm-test
Downloading elm-lang/core
Downloading laszlopandy/elm-console
Packages configured successfully!
To install laszlopandy/elm-console I would like to add the following
dependency to elm-package.json:

"laszlopandy/elm-console": "1.0.2 <= v < 2.0.0"

May I add that to elm-package.json for you? (y/n) y

Packages configured successfully!
Created TestRunner.elm
Created Tests.elm

Then when I run the tests I see the following:

❯ elm-test TestRunner.elm
Successfully compiled TestRunner.elm
Running tests...
  1 suites run, containing 3 tests
  0 suites and 2 tests passed
  1 suites and 1 tests failed

Can you please post your output from running elm-test init?

trezona-lecomte avatar Nov 23 '15 22:11 trezona-lecomte

When I run elm-test I get:

elm-package.json already exists Packages configured successfully! Packages configured successfully! TestRunner.elm already exists Tests.elm already exists

The issue might be that I have elm-test version 2.0.0. But it isn't clear to me how to get 3.0.0

leahsteinberg avatar Nov 23 '15 22:11 leahsteinberg

Can I clone the repo? It's hard to know what the issue could be without a bit more info sorry.

trezona-lecomte avatar Nov 24 '15 00:11 trezona-lecomte

Yes, if you have version 2.0.0 then there isn't an ElmTest module itself. It was refactored in 3.0.0. Can you post the contents of your elm-package.json file?

deadfoxygrandpa avatar Nov 24 '15 01:11 deadfoxygrandpa

EDIT: Didn't see your pull request. It solves the problem:


I'm getting a somewhat similar error:

HacBook-Pro:elm-test cem2ran$ npm install -g elm-test
/Users/cem2ran/.nvm/versions/node/v4.1.1/bin/elm-test -> /Users/cem2ran/.nvm/versions/node/v4.1.1/lib/node_modules/elm-test/bin/elm-test
[email protected] /Users/cem2ran/.nvm/versions/node/v4.1.1/lib/node_modules/elm-test
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected]
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
HacBook-Pro:elm-test cem2ran$ elm-test init
Created elm-package.json
To install deadfoxygrandpa/elm-test I would like to add the following
dependency to elm-package.json:

    "deadfoxygrandpa/elm-test": "2.0.0 <= v < 3.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:
    deadfoxygrandpa/elm-test 2.0.0
    elm-lang/core 2.1.0
    laszlopandy/elm-console 1.0.2

Do you approve of this plan? (y/n) y
Downloading deadfoxygrandpa/elm-test
Downloading elm-lang/core
Downloading laszlopandy/elm-console
Packages configured successfully!
To install laszlopandy/elm-console I would like to add the following
dependency to elm-package.json:

    "laszlopandy/elm-console": "1.0.2 <= v < 2.0.0"

May I add that to elm-package.json for you? (y/n) y

Packages configured successfully!
Created TestRunner.elm
Created Tests.elm
HacBook-Pro:elm-test cem2ran$ elm-test TestRunner.elm 
Error when searching for modules imported by module 'Main':
    Could not find module 'ElmTest'

Potential problems could be:
  * Misspelled the module name
  * Need to add a source directory or new dependency to elm-package.json

cem2ran avatar Nov 25 '15 15:11 cem2ran

@cem2ran You need to change your dependency to: "deadfoxygrandpa/elm-test": "3.0.0 <= v < 4.0.0"

You're using version 2.0.0 still, but trying to use the 3.0.0 API.

deadfoxygrandpa avatar Nov 26 '15 01:11 deadfoxygrandpa

Even when I go into elm-package.json and change the dependency to "3.0.0 <= v < 4.0.0", when I do elm-package install, it keeps saying everything is up to date but it never actually downloads the 3.0.0 version of elm-test. And when I use elm-test the npm module, it asks if I want to download 2.0.0 <= v < 3.0.0 and I can't figure out a way to actually get 3.0.0.

leahsteinberg avatar Nov 30 '15 17:11 leahsteinberg

Can you try deleting the elm-stuff directory and installing everything again with the 3.0.0 <= v < 4.0.0 dependency listed?

deadfoxygrandpa avatar Nov 30 '15 18:11 deadfoxygrandpa

I've tried that :/ When I run elm-package install deadfoxygrandpa/elm-test it says Error: This is a tricky update, you should modify elm-package.json yourself. Package deadfoxygrandpa/elm-test is already listed as a dependency:

"deadfoxygrandpa/elm-test": "3.0.0 <= v < 4.0.0"

You probably want one of the following constraints instead:

2.0.0 <= v < 4.0.0
2.0.0 <= v < 3.0.0

and it also doesn't work if I add "3.0.0" to the end of that command.

leahsteinberg avatar Nov 30 '15 19:11 leahsteinberg