Skip to content
This repository has been archived by the owner on Jul 14, 2019. It is now read-only.

src directory not installed #11

Closed
bitterjug opened this issue Feb 28, 2018 · 12 comments
Closed

src directory not installed #11

bitterjug opened this issue Feb 28, 2018 · 12 comments

Comments

@bitterjug
Copy link
Contributor

I tried to install into an elm project today. I noticed #10 init is no longer available but that wasn't the main blocker. I followed the instructions in the readme, but the src directory didn't get installed:

$ ls node_modules/elm-webdriver/
Api.md  bin  elm-stuff  example  package.json  Readme.md  webdriver-tests

So can't build the tests.

@lorenzo
Copy link
Owner

lorenzo commented Feb 28, 2018

I definitely suck at npm. Sorry for the trouble, I’ll try to get that fixed tomorrow

@bitterjug
Copy link
Contributor Author

I thought this was because package.json now contains files part:

  "files": [
    "bin",
    "Readme.md",
    "Api.md"
  ],

This SO answer says:

That is, instead of including everything by default, if files array is specified everything is excluded by default and only those files explicitly listed will be included in the packaged tarball.

So i did npm pack in my copy of elm-webdriver. But the tgz it created looked like this:

.
└── package
    ├── Api.md
    ├── bin
    │   └── elm-webdriver.js
    └── package.json

Which doesn't even include Readme.md so I'm afraid I don't even understand what is going on.

@lorenzo
Copy link
Owner

lorenzo commented Mar 1, 2018

@bitterjug I published a new version. Can you verify it works for you?

@bitterjug
Copy link
Contributor Author

bitterjug commented Mar 1, 2018

Alright src is there now.
I tried to install this in a clearn directory. I just made a directory and did npm init to create package.json. then did npm install elm-webdriver, created tests/, copied the templates there and replaced Main.elm with the sample as per readme. When I try to compile that, this happens:

[:~/workspace/elm/wdtest/tests] $ ../node_modules/.bin/elm-webdriver
Error: Your .elm/packages/ directory may be corrupted. I was led to believe that
lorenzo/elm-webdriver existed, but I could not find anything when I went to look
up the published versions of this package.


Failed to compile tests

Do I need to separately install elm test or something? similar

@lorenzo
Copy link
Owner

lorenzo commented Mar 1, 2018

@bitterjug there should be a different elm-package.json for the tests folder should looks something like this: https://github.com/lorenzo/elm-webdriver/blob/master/templates/elm-package.json

The important line is this one: https://github.com/lorenzo/elm-webdriver/blob/master/templates/elm-package.json#L9

@bitterjug
Copy link
Contributor Author

bitterjug commented Mar 2, 2018

@lorenzo thanks for being so pro-active to fix this.

I have that. I mean I copied the one from templates which looks like this:

{
  "version": "1.0.0",
  "summary": "Setup for running webdriver tests. DO NOT MODIFY THE REPOSITORY FIELD",
  "repository": "https://github.com/lorenzo/elm-webdriver.git",
  "license": "BSD3",
  "source-directories": [
    ".",
    "../src",
    "../node_modules/elm-webdriver/src"
  ],
  "exposed-modules": [],
  "native-modules": true,
  "dependencies": {
    "elm-community/elm-test": "3.0.0 <= v < 4.0.0",
    "elm-lang/core": "5.1.1 <= v < 6.0.0",
    "lorenzo/elm-webdriver": "3.0.0 <= v < 4.0.0"
  },
  "elm-version": "0.18.0 <= v < 0.19.0"
}

I tried npm install [email protected] and got a lot further. init worked, and he tests compile and run:

2d [:~/dev/webdriver-tests] master* ± ../node_modules/.bin/elm-webdriver

0 - All Tests / Finding Elm Lang in Google
 ———————————————————————————————————————————————————————————— 0/8 (0%)
→ Waiting for start

1 - All Tests / Finding hacker news in Google
 ———————————————————————————————————————————————————————————— 0/8 (0%)
→ Waiting for start

@lorenzo
Copy link
Owner

lorenzo commented Mar 2, 2018

selenium is not started automatically for you (on my todo list). Have a look at the reasmenin how to inatall it and run it.

The selenium server needs to be running before executing the tests

@lorenzo
Copy link
Owner

lorenzo commented Mar 2, 2018

I’ll investigate by installing it myself with nom why this new version does not work. Thanks for your patience

@bitterjug
Copy link
Contributor Author

The selenium thing (that I ran into on 2.0.2) is a different issue. (I had actually run the standalone server in another window before I started this but I dont want to look into that here).

The issue we're facing really is why 3.0.1 doesn't compile stuff.
So if we can work out together why that's not working for me that'd be great.

Thanks for your help.

@lorenzo
Copy link
Owner

lorenzo commented Mar 2, 2018

@bitterjug I published 3.0.3, I think this is fixed now.

@lorenzo lorenzo closed this as completed Mar 2, 2018
@bitterjug
Copy link
Contributor Author

@lorenzo yeah 3.0.3 compiles tests that run, and the init command also works.
Thanks for fixing this.

@lorenzo
Copy link
Owner

lorenzo commented Mar 3, 2018

Great news! Thanks for confirming it worked for you

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

No branches or pull requests

2 participants