Skip to content

Conversation

@technicalpickles
Copy link
Member

This fails for me in development, for some reason:

$ npm test

> @ test /Users/technicalpickles/hubotio/hubot-for-hubot
> mocha --compilers coffee:coffee-script/register



  hubot
    user says hi to hubot
[Fri Jun 30 2017 17:39:02 GMT-0400 (EDT)] ERROR Cannot load adapter null - Error: Cannot find module 'hubot-null'
npm ERR! Test failed.  See above for more details.

hubot-test-helper subclasses robot and handles making its own adapter. The error message is coming from robot's loadAdapter, which is weird because hubot-test-helper should be overriding it

What is weird to me is that Travis is passing 🤔

cc @gr2m hubotio/evolution#4

@gr2m
Copy link
Contributor

gr2m commented Jul 5, 2017

I checked out the branch, run npm install and npm test, and it all worked, just like on CI. What node/npm versions are you using? Can past the output of $ npm ls | grep hubot for comparison?

@ /Users/gregor/Projects/github/hubotio/hubot-for-hubot
├─┬ hubot@3.0.1
├── hubot-help@1.0.1
├─┬ hubot-redis-brain@1.0.0
├── hubot-rules@1.0.0
├── hubot-shipit@0.2.1
├─┬ hubot-slack@4.3.4
├─┬ hubot-test-helper@1.5.1
│ └─┬ hubot@2.19.0

@technicalpickles
Copy link
Member Author

$ npm ls | grep hubot
npm WARN unmet dependency /Users/technicalpickles/hubotio/hubot-for-hubot/node_modules/hubot-test-helper requires hubot@'>= 2.6.0 < 3' but will load
npm WARN unmet dependency /Users/technicalpickles/hubotio/hubot-for-hubot/node_modules/hubot,
npm WARN unmet dependency which is version 3.0.1
@ /Users/technicalpickles/hubotio/hubot-for-hubot
├─┬ hubot@3.0.1 invalid
├── hubot-help@1.0.1
├─┬ hubot-redis-brain@1.0.0
├── hubot-rules@1.0.0
├── hubot-shipit@0.2.1
├── hubot-slack@4.3.4
├── hubot-test-helper@1.5.1
npm ERR! invalid: hubot@3.0.1 /Users/technicalpickles/hubotio/hubot-for-hubot/node_modules/hubot
$ npm --version
2.15.11
$ npm --version
2.15.11

@gr2m
Copy link
Contributor

gr2m commented Jul 6, 2017

what node version? I tested it with node v4.8.3 / npm v2.15.11 and could not reproduce it. Can you try to rm -rf node_modules && npm install and then npm test?

I think the problem is that hubot-test-helper does not have its own hubot dependency installed.
We could try to get hubot-test-helper moved to the hubotio org as well and update it to the latest hubot version, too?

@technicalpickles
Copy link
Member Author

One of those npm --versions was supposed to be node 😓

$ node --version
v4.8.3

Removing rm -r node_modules && npm install && npm test does work 🤔 I also tried going back to master to do an npm install, and then switching to this branch, and no problem 🤔 🤔 I don't even get the npm warning.

I think we can start with a PR to update the peer dependencies and see how that goes.

@technicalpickles
Copy link
Member Author

I submitted mtsmfm/hubot-test-helper#44 upstream, and that was released as 1.6.0

I updated to using that, and now I am getting the same error as before. Even worse, I'm getting it consistently even after removing node_modules and re npm installing 🤔

@gr2m
Copy link
Contributor

gr2m commented Jul 7, 2017

I know get the error, too 🤔 It looks like it’s related to this line https://github.com/mtsmfm/hubot-test-helper/blob/master/src/index.coffee#L12. In the constructor it tries to load the the adapter based on the passed name which is prefixed with hubot- hence the error bout hubot-null.

When I downgraded to hubot-test-helper@1.5.1 things passed again, so it definitely looks like a regression because hubot-test-helper@1.5.1 installed hubot@2, while hubot-test-helper@1.6.0 does not install its own hubot anymore and uses the same ashubot-for-hubot which is v3.

This will require some investigation, but we should definitely figure out why it’s failing with the new hubot before making hubot@3 the latest release on npm

@joeyguerra joeyguerra deleted the hubot-3 branch November 10, 2023 15:55
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

Successfully merging this pull request may close these issues.

2 participants