Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

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

Closed
molecula451 opened this issue Sep 22, 2023 · 46 comments · Fixed by #797
Closed

Comments

@molecula451
Copy link
Member

molecula451 commented Sep 22, 2023

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
Copy link
Member

0x4007 commented Sep 22, 2023

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

@molecula451
Copy link
Member Author

/start

@ubiquibot
Copy link

ubiquibot bot commented Sep 22, 2023

Deadline Fri, 22 Sep 2023 08:59:29 UTC
Registered Wallet 0x4D0704f400D57Ba93eEa88765C3FcDBD826dCFc4
Tips:
  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address @user.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the bounty.

    @molecula451
    Copy link
    Member Author

    molecula451 commented Sep 22, 2023

    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
    Copy link
    Member Author

    @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
    Copy link
    Contributor

    devpanther commented Sep 22, 2023

    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 #558 (comment)

    Cause of the problem: #558 (comment)

    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
    Copy link
    Member Author

    molecula451 commented Sep 22, 2023

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

    @molecula451
    Copy link
    Member Author

    index.js magically moved out /src

    @molecula451
    Copy link
    Member Author

    thanks for the input @devpanther

    @devpanther
    Copy link
    Contributor

    devpanther commented Sep 22, 2023

    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
    Copy link
    Member Author

    i know, just for the fun :]

    @molecula451
    Copy link
    Member Author

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

    @molecula451 molecula451 changed the title yarn build generates /lib/index.js instead of /lib/src/index.js [local bug] yarn build generates /lib/index.js instead of /lib/src/index.js Sep 22, 2023
    @molecula451 molecula451 changed the title [local bug] yarn build generates /lib/index.js instead of /lib/src/index.js [local development bug] yarn build generates /lib/index.js instead of /lib/src/index.js Sep 22, 2023
    @molecula451
    Copy link
    Member Author

    #797 (comment)

    @molecula451
    Copy link
    Member Author

    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
    Copy link
    Member

    Keyrxng commented Sep 23, 2023

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

    @seprintour
    Copy link
    Contributor

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

    @molecula451
    Copy link
    Member Author

    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
    Copy link
    Member Author

    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 #558 (comment) for the bug context

    @molecula451
    Copy link
    Member Author

    molecula451 commented Sep 23, 2023

    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
    Copy link

    ubiquibot bot commented Sep 24, 2023

    @0x4007 0x4007 closed this as completed Sep 24, 2023
    @ubiquibot
    Copy link

    ubiquibot bot commented Sep 24, 2023

    ! Error: Permit generation skipped, penalty removed

    @whilefoo
    Copy link
    Collaborator

    @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
    Copy link
    Member Author

    @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
    Copy link
    Member

    0x4007 commented Sep 24, 2023

    @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
    Copy link
    Contributor

    @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
    Copy link
    Member Author

    @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
    Copy link
    Member

    0x4007 commented Sep 25, 2023

    @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
    Copy link
    Member Author

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

    @0xcodercrane
    Copy link
    Contributor

    /query @molecula451

    @ubiquibot
    Copy link

    ubiquibot bot commented Sep 26, 2023

    Error retrieving access for @molecula451

    @molecula451
    Copy link
    Member Author

    /query @molecula451

    @ubiquibot
    Copy link

    ubiquibot bot commented Sep 26, 2023

    Error retrieving access for @molecula451

    @0x4007
    Copy link
    Member

    0x4007 commented Sep 26, 2023

    /allow set-time @molecula451 true

    @ubiquibot
    Copy link

    ubiquibot bot commented Sep 26, 2023

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

    @0x4007
    Copy link
    Member

    0x4007 commented Sep 26, 2023

    /query @molecula451

    @ubiquibot
    Copy link

    ubiquibot bot commented Sep 26, 2023

    @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
    Copy link
    Member

    0x4007 commented Sep 26, 2023

    😉

    @wannacfuture
    Copy link
    Contributor

    wannacfuture commented Sep 26, 2023

    The fix isn't merged to production, yet.

    @molecula451
    Copy link
    Member Author

    you should know?

    @rndquu rndquu reopened this Sep 28, 2023
    @ubiquibot
    Copy link

    ubiquibot bot commented Sep 28, 2023

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

    @rndquu rndquu closed this as completed Sep 28, 2023
    @ubiquibot
    Copy link

    ubiquibot bot commented Sep 28, 2023

    Task Creator Reward

    molecula451: [ CLAIM 17.1 WXDAI ]

    @molecula451
    Copy link
    Member Author

    @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
    Copy link
    Member

    0x4007 commented Oct 4, 2023

    /query @molecula451

    @ubiquibot
    Copy link

    ubiquibot bot commented Oct 4, 2023

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

    @0x4007
    Copy link
    Member

    0x4007 commented Oct 4, 2023

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

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

    Successfully merging a pull request may close this issue.

    9 participants