Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ElmTest module not found #33

Open
leahsteinberg opened this issue Nov 23, 2015 · 9 comments
Open

ElmTest module not found #33

leahsteinberg opened this issue Nov 23, 2015 · 9 comments

Comments

@leahsteinberg
Copy link

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?

@trezona-lecomte
Copy link
Contributor

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?

@leahsteinberg
Copy link
Author

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

@trezona-lecomte
Copy link
Contributor

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

@deadfoxygrandpa
Copy link
Owner

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?

@cem2ran
Copy link

cem2ran commented Nov 25, 2015

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
elm-test@0.16.0 /Users/cem2ran/.nvm/versions/node/v4.1.1/lib/node_modules/elm-test
├── node-elm-compiler@2.0.0
├── temp@0.8.3 (os-tmpdir@1.0.1, rimraf@2.2.8)
├── lodash@3.10.1
└── fs-extra@0.26.2 (path-is-absolute@1.0.0, jsonfile@2.2.3, klaw@1.1.2, graceful-fs@4.1.2, rimraf@2.4.4)
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

@deadfoxygrandpa
Copy link
Owner

@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.

@leahsteinberg
Copy link
Author

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.

@deadfoxygrandpa
Copy link
Owner

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

@leahsteinberg
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants