ubiquity / ubiquibot

Putting the 'A' in 'DAO'
https://github.com/marketplace/ubiquibot
MIT License
17 stars 59 forks source link

[local development bug] yarn build generates /lib/index.js instead of /lib/src/index.js #796

Closed molecula451 closed 11 months ago

molecula451 commented 11 months ago

just did a clean install and I get another error upon yarn start: Cannot find module './lib/src/index.js'. it seems Typescript is generating ./lib/index.js instead of ./lib/src/index.js. Not sure why it changed

Originally from telegram: by @whilefoo https://t.me/UbiquityDAO/31132/31145

0x4007 commented 11 months ago

It is unclear to me if this is a blocker, or if this issue is easy to circumvent

molecula451 commented 11 months ago

/start

ubiquibot[bot] commented 11 months ago

Deadline Fri, 22 Sep 2023 08:59:29 UTC
Registered Wallet 0x4D0704f400D57Ba93eEa88765C3FcDBD826dCFc4
Tips:
molecula451 commented 11 months ago

It is unclear to me if this is a blocker, or if this issue is easy to circumvent

yeah it is a blocker, it is both

molecula451 commented 11 months ago

@pavlovcik on a clean build, touching nothing

$ probot run ./lib/src/index.js
/home/ubiquibot/node_modules/resolve/lib/sync.js:111
    var err = new Error("Cannot find module '" + x + "' from '" + parent + "'");
              ^
Error: Cannot find module './lib/src/index.js' from '/home/ubiquibot'
    at resolveSync (/home/ubiquibot/node_modules/resolve/lib/sync.js:111:15)
    at resolveAppFunction (/home/ubiquibot/node_modules/probot/lib/helpers/resolve-app-function.js:34:23)
    at combinedApps (/home/ubiquibot/node_modules/probot/lib/run.js:101:79)
    at async Server.load (/home/ubiquibot/node_modules/probot/lib/server/server.js:60:9)
    at async run (/home/ubiquibot/node_modules/probot/lib/run.js:105:9) {
  code: 'MODULE_NOT_FOUND'
}

PRing...

devpanther commented 11 months ago

It is unclear to me if this is a blocker, or if this issue is easy to circumvent

It is a blocker for development, this was an issue a month ago, you can see the discussion here https://github.com/ubiquity/ubiquibot/pull/558#issuecomment-1663936287

Cause of the problem: https://github.com/ubiquity/ubiquibot/pull/558#issuecomment-1661891217

So it was changed from ./lib/index.js to ./lib/src/index.js to solve the issue but I guess the json has been removed so its gone back to normal

@wannacfuture @whilefoo here's explanation on how it started

molecula451 commented 11 months ago

you may see the clean/clear output from the npm above

molecula451 commented 11 months ago

index.js magically moved out /src

molecula451 commented 11 months ago

thanks for the input @devpanther

devpanther commented 11 months ago

index.js magically moved out /src

it wasn't magic lol, you can read through the comment I attached and the StackOverflow on one of the comment

molecula451 commented 11 months ago

i know, just for the fun :]

molecula451 commented 11 months ago

impressive the stuff at #583 Comment that it's how bug emerges

molecula451 commented 11 months ago

https://github.com/ubiquity/ubiquibot/pull/797#issuecomment-1731109294

molecula451 commented 11 months ago
yarn run v1.22.19
$ probot run ./lib/index.js

  _|    _|  _|_|_|    _|_|_|    _|_|      _|    _|  _|_|_|  _|_|_|_|_|  _|      _|
  _|    _|  _|    _|    _|    _|    _|    _|    _|    _|        _|        _|  _|
  _|    _|  _|_|_|      _|    _|  _|_|    _|    _|    _|        _|          _|
  _|    _|  _|    _|    _|    _|    _|    _|    _|    _|        _|          _|
    _|_|    _|_|_|    _|_|_|    _|_|  _|    _|_|    _|_|_|      _|          _|

INFO (server): Running Probot v12.3.1 (Node.js: v18.16.1)
INFO (server): Forwarding https://smee.io/q5fmDornulyf5ge to http://localhost:3000/
INFO (server): Listening on http://localhost:3000
INFO (server): Connected
Keyrxng commented 11 months ago

I'm not getting these issues with a fresh yarn install

seprintour commented 11 months ago

You can't, you have to delete the lib folder first

molecula451 commented 11 months ago
probot run ./lib/index.js

this is reproducible, you can see how probot looks for index.js in /lib not in /lib/src

probot run ./lib/index.js

molecula451 commented 11 months ago
probot run ./lib/index.js

this is reproducible, you can see how probot looks for index.js in /lib not in /lib/src

probot run ./lib/index.js

refer to https://github.com/ubiquity/ubiquibot/pull/558#issuecomment-1663936287 for the bug context

molecula451 commented 11 months ago

all feedback it's great, altho everything points out index.js should be and is at /lib/index.js an start there, i'm sure probot architecture is designed to be so

ubiquibot[bot] commented 11 months ago

Conversation Rewards

devpanther: [ CLAIM 21.15 WXDAI ]

Keyrxng: [ CLAIM 1.5 WXDAI ]

seprintour: [ CLAIM 1.5 WXDAI ]

ubiquibot[bot] commented 11 months ago

@molecula451 please be sure to review this conversation and implement any necessary fixes. Unless this is closed as completed, its payment of 21.15 WXDAI will be deducted from your next bounty.

ubiquibot[bot] commented 11 months ago
! Error: Permit generation skipped, penalty removed
whilefoo commented 11 months ago

@pavlovcik it seems the permit was generated and even saved to the DB, from that moment on it should post all comments but it only posted conversation reward comment. My suspicion is on Netlify's 10 second timeout.

molecula451 commented 11 months ago

@pavlovcik it seems the permit was generated and even saved to the DB, from that moment on it should post all comments but it only posted conversation reward comment. My suspicion is on Netlify's 10 second timeout.

10 sec?

0x4007 commented 11 months ago

@0xcodercrane Also suspects a timeout issue. I think it makes sense because of the logs showing that it will generate a payment permit as well as the inconsistency of it sometimes posting.

Logical errors would be consistent

devpanther commented 11 months ago

@0xcodercrane Also suspects a timeout issue. I think it makes sense because of the logs showing that it will generate a payment permit as well as the inconsistency of it sometimes posting.

Logical errors would be consistent

You think #794 would fix this?, it joins all the permits together in 1

molecula451 commented 11 months ago

@pavlovcik it seems the permit was generated and even saved to the DB, from that moment on it should post all comments but it only posted conversation reward comment. My suspicion is on Netlify's 10 second timeout.

both? assignee and creator permits?

0x4007 commented 11 months ago

@0xcodercrane Also suspects a timeout issue. I think it makes sense because of the logs showing that it will generate a payment permit as well as the inconsistency of it sometimes posting. Logical errors would be consistent

You think #794 would fix this?, it joins all the permits together in 1

Depends on why its timing out. The only way I could see this being the solution is if each comment waits for the previous network response in series. Then it could be, for example, 100ms for each network request, but in series thats like 400ms of lag.

@0xcodercrane claims that its due to the mdast comment parser which doesn't make sense to me.

molecula451 commented 11 months ago

but what the logs says? it doesn't make sense time out either, there is comments rewards there to be honest

0xcodercrane commented 11 months ago

/query @molecula451

ubiquibot[bot] commented 11 months ago

Error retrieving access for @molecula451

molecula451 commented 11 months ago

/query @molecula451

ubiquibot[bot] commented 11 months ago

Error retrieving access for @molecula451

0x4007 commented 11 months ago

/allow set-time @molecula451 true

ubiquibot[bot] commented 11 months ago

Updated access for @molecula451 successfully! Access: time for "ubiquity/ubiquibot"

0x4007 commented 11 months ago

/query @molecula451

ubiquibot[bot] commented 11 months ago

@molecula451's wallet address is 0x4D0704f400D57Ba93eEa88765C3FcDBD826dCFc4, multiplier is 1 and access levels are

access type access level
multiplier false
priority false
time true
price false
0x4007 commented 11 months ago

😉

wannacfuture commented 11 months ago

The fix isn't merged to production, yet.

molecula451 commented 11 months ago

you should know?

ubiquibot[bot] commented 11 months ago

@molecula451 please be sure to review this conversation and implement any necessary fixes. Unless this is closed as completed, its payment of 21.15 WXDAI will be deducted from your next bounty.

ubiquibot[bot] commented 11 months ago

Task Creator Reward

molecula451: [ CLAIM 17.1 WXDAI ]

molecula451 commented 11 months ago

@molecula451 please be sure to review this conversation and implement any necessary fixes. Unless this is closed as completed, its payment of 21.15 WXDAI will be deducted from your next bounty.

the only permit for this amount was devpanther: [ CLAIM 21.15 WXDAI ]

0x4007 commented 10 months ago

/query @molecula451

ubiquibot[bot] commented 10 months ago

@molecula451's wallet address is 0x4D0704f400D57Ba93eEa88765C3FcDBD826dCFc4 and multiplier is 1

0x4007 commented 10 months ago

https://gnosisscan.io/tx/0xa7b16eba70bf94ecfad02df3b2fcc1f571fa58a7a152ec4c2c98592b072a7be6